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

XF 1.1 Show Different code dependent on gender

akia

Well-known member
#1
Hi,

I want to show different code in my template dependent on whether someone is signed in and what their gender is.

The code I've got is as follows:
Code:
<xen:if is="!{$visitor.user_id}">
Code for guests/nonspecified gender
</xen:if>
<xen:if is="{$visitor.user_id}">
<xen:if is="{$user.gender} == 'male'">
Code for Men
</xen:if>
<xen:if is="{$user.gender} == 'female'">
Code for Women
</xen:if>
<xen:if is="!{$visitor.gender} OR {$visitor.gender} == ''">
Repete of Code for guests/nonspecified gender
</xen:if>
</xen:if>
But it dosn't work, can anyone tell me where I'm going wrong?