XF 2.0 Upgrade Style to 2

Moses

Well-known member
Hello,
I'm attempting to port some customisations I wrote for XF 1 on XF 2, and am hoping for some pointers.

Here's how it used to look - the top right in the red box:
1519109498893.webp

It looks like post_macros is the place I need to edit, however nothing seems to return the value of the user's custom user field. Some that I've tried:
Code:
{$user.Profile.custom_fields.international_rugby_team}
Code:
{$user.Profile.custom_fields.international_rugby_team.title}
Code:
{$user.Profile.custom_fields.international_rugby_team.value}
Code:
{{ $user.Profile.custom_fields.international_rugby_team }}
Code:
            {$user.Profile.custom_fields.getFormattedValue('international_rugby_team')|raw}

Cheers,
Moses.
 
Hello,
I'm attempting to port some customisations I wrote for XF 1 on XF 2, and am hoping for some pointers.

Here's how it used to look - the top right in the red box:
View attachment 169327

It looks like post_macros is the place I need to edit, however nothing seems to return the value of the user's custom user field. Some that I've tried:
Code:
{$user.Profile.custom_fields.international_rugby_team}
Code:
{$user.Profile.custom_fields.international_rugby_team.title}
Code:
{$user.Profile.custom_fields.international_rugby_team.value}
Code:
{{ $user.Profile.custom_fields.international_rugby_team }}
Code:
            {$user.Profile.custom_fields.getFormattedValue('international_rugby_team')|raw}

Cheers,
Moses.

Try this:

{$xf.visitor.Profile.custom_fields.international_rugby_team}
 
Back
Top Bottom