Basic variables like username


Well-known member
How do I make a username appear in the text on an XF html Page?
or in the Page Title?

Also is there a list anywhere of basic variables like that?
I used to use one on another forum software which was very useful. I think that was $user


Well-known member
Jake you're a darling as always.
I got that to work in the Page body.

Any chance of making the user's name appear in the Page Title -
(the large title which shows on the Page with a line of small description text underneath it)

so it could be called XXXX's Toybox - or whatever.

Jake Bunce

XenForo moderator
Staff member
Most of the "view" templates have a xen:h1 tag at the top. That is where the title is defined. You can add the username variable to that tag. For example:

<xen:h1>{$visitor.username}'s Toybox</xen:h1>


Well-known member
Jake that's very satisfying.
What if it's a visitor not logged in?
How would I make it say "My" instead of the username?

Also I put
{$visitor.username}'s Toybox
in as the Title in the admincp edit form but what appears in the node list is the code, not my name.