XF 1.1 <xen: else /> in xenforo

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



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


<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
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

Last edited: