XF 1.2 What variables are available in page nodes?

Stuart Wright

Well-known member
I want to address the reader of a page node by name.
I have set up a conditional to only do it if they are a member.
How do I display their login name in the page?

Maybe this could be added to Brogan's page tutorial.

Thanks
 
The current logged in user is always available in the {$visitor} object. That is available globally.

{$user} never refers to the current logged in user. In fact, it isn't used in many places. Mostly on profile and member pages. In those cases it only ever refers to the user you're looking at.

But indeed, {$visitor.username} is correct.
 
Back
Top Bottom