• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 <xen: else /> in xenforo

#1
I creat Custom User Fields " gender"

I Want.

If the user selects gender is Nu. Display image /images/gender/Nu.gif

If the user selects gender is Nam. Display image /images/gender/Nam.gif

Crossbred

/images/gender/Unknow.gif

But ,All They display images/gender/Unknow.gif

Why???


<dt>My Gender:</dt> <img src="./images/gender/<xen:if is="{$user.customFields.gender}=='Nam'">Nam<xen: else /><xen:if is="{$user.customFields.gender}=='Nu'">Nu<xen:else />Unknow</xen:if></xen:if>.gif" border="0" alt="gender"></img>

Please give me the correct command
 
#3
Paste {$user.customFields.gender} elsewhere in the template so you can view the output on the page. Verify the value stored in that variable.
I do not understand your answer very
I use it in message_user_info
But ,All They display images/gender/Unknow.gif

Why??
 
Last edited: