XF 2.3 HTML widget get plain text username

frm

Well-known member
Trying to call {{ $xf.user.username }} in an HTML widget.

Is there any other way to get a plain text output of the username? This doesn't appear to work, and I believe <xf:username> returns a link to the profile.
 
Solution
You can see which vars are available by adding this to the widget template: {{dump(vars())}} .

Presumably you want to display the name of the member viewing the widget?
In which case you would use {$xf.visitor.username} .
You can see which vars are available by adding this to the widget template: {{dump(vars())}} .

Presumably you want to display the name of the member viewing the widget?
In which case you would use {$xf.visitor.username} .
 
Solution
Back
Top Bottom