• 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


Well-known member

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:
<xen:if is="!{$visitor.user_id}">
Code for guests/nonspecified gender
<xen:if is="{$visitor.user_id}">
<xen:if is="{$user.gender} == 'male'">
Code for Men
<xen:if is="{$user.gender} == 'female'">
Code for Women
<xen:if is="!{$visitor.gender} OR {$visitor.gender} == ''">
Repete of Code for guests/nonspecified gender
But it dosn't work, can anyone tell me where I'm going wrong?