XF 1.4 display custom field text to postbit


Well-known member

I am trying toi setup a rather complex system for an rpg site which will have several dozen badges.

what i need is to know if there is a way to have the alt/title show the text of the field vs the value?

<img src="/rpg/rol/faction_{$user.customFields.rol_ff_faction}.png" class="rpgIcon Tooltip" width="36px" height="36px"  title="*here*" alt="*here*" />
Example instead of faction_3 have it show "Rebel Alliance" etc :)


Well-known member
You can display custom fields in the postbit by ticking the option in ACP > Appearance > Style Properties > Message Elements

Is there a reason why you're trying to do it a different way?


Well-known member
yep the postbit is entirely custom :) uses none of the default xf fields, all custom fields used to pull images

Jon W

Well-known member
The text is a phrase, but XenForo doesn't allow you to use variables in phrase names, so I think the only way to do this would be to use a full conditional if statement:
{xen:if '{$user.customFields.rol_ff_faction} == faction_3', 'Rebel Alliance'}
The only other way is using an add-on to expose all the different phrases to the template in an array.