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

XF 1.3 Changing Theme Auto by gender ?

Discussion in 'Styling and Customization Questions' started by Kaan SAKA, Apr 4, 2014.

  1. Kaan SAKA

    Kaan SAKA Member

    Hi,

    I want to use my them's different colors for men and women.

    For example, if my visitor is female, she must see my them's pink type and if my visitor is male, he must see my theme's blue type.

    I try this code for node_category_level_1;

    I find this;
    <div class="nodeInfo categoryNodeInfo categoryStrip" >

    And change with this;
    <xen:if is="{$visitor.gender} == 'male'">
    <div class="nodeInfo categoryNodeInfo categoryStrip" >
    <xen:elseif is="{$visitor.gender} == 'female'" />
    <div class="nodeInfo categoryNodeInfo categoryStrip2" >
    <xen:elseif is="{$visitor.gender} == ''" />
    <div class="nodeInfo categoryNodeInfo categoryStrip" >
    </xen:if>


    But in public.css this code doesnt work;

    I find this;
    <xen:include template="navigation.css" />

    And change with this;
    <xen:if is="{$visitor.gender} == 'male'">
    <xen:include template="navigation.css" />
    <xen:elseif is="{$visitor.gender} == 'female'" />
    <xen:include template="navigation2.css" />
    <xen:elseif is="{$visitor.gender} == ''" />
    <xen:include template="navigation.css" />
    </xen:if>

    Is there anyone who will help me ?
    Thanks.
     
  2. Martin F

    Martin F Member

    Have you considered the repercussions with this? How will this go down with your members? Basically your idea is to forcibly identify your members to a certain style (color of style) based on their gender. And based on your explanation of what you want done, they could not change to the other theme without changing their gender.
     
  3. Lisa

    Lisa Well-Known Member

    I'm a girl.. I hate pink. The quickest way to stop me using a forum would be to force me to use a pink style :D
     
    Amaury likes this.
  4. Kaan SAKA

    Kaan SAKA Member

    Oh friends,
    I will also give chance to change them to what they want.
    I want to know how can I use <xen:if is="{$visitor.gender} == 'male'"> this code in public.css
    Thanks.
     
  5. Kevin

    Kevin Well-Known Member

    What about magenta & blue? :whistle:
     
    Lisa likes this.
  6. Kaan SAKA

    Kaan SAKA Member

    Friends,
    Can you concentrate on my question ???
    Thanks.
     

Share This Page