XF 1.4 display custom field text to postbit

Nudaii

Well-known member
howdy

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?

Code:
<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 :)
 
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?
 
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:
HTML:
{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.
 
Top Bottom