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

XF 1.3 Conditional statement in "CSS" template.

Discussion in 'Styling and Customization Questions' started by Mian Shahid, Aug 25, 2014.

  1. Mian Shahid

    Mian Shahid Well-Known Member

    Hi, Can we use conditional statement in "CSS" templates? for example:

    PHP:
    <xen:if is="{$visitor.user_id}">
    .
    conversation_view .messageList
    {
       
    border1px solid @primaryLighterStill;
       
    border-leftnone;
       
    border-bottomnone;
       
    padding-right10px;
       
    border-top-right-radius10px;

    <
    xen:elseif is="{$visitor.user_id}">
    .
    conversation_view .messageList
    {
       
    border1px solid @primaryLighterStill;
       
    border-leftnone;
       
    border-bottomnone;
       
    padding-right10px;
       
    border-top-right-radius10px;

    <
    xen:elseif is="{$visitor.user_id}">
    .
    conversation_view .messageList
    {
       
    border1px solid @primaryLighterStill;
       
    border-leftnone;
       
    border-bottomnone;
       
    padding-right10px;
       
    border-top-right-radius10px;
    <
    xen:else />
    .
    conversation_view .messageList
    {
       
    border1px solid @primaryLighterStill;
       
    border-leftnone;
       
    border-bottomnone;
       
    padding-right10px;
       
    border-top-right-radius10px;
    </
    xen:if>

    If yes, kindly advise correct way to put these together.

    Thank you in advance. :)
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    CSS templates don't support conditional statements.
     
  3. Milano

    Milano Well-Known Member

    I don't think so.

    I believe you can, why not try it yourself.
     
    rafass and Mian Shahid like this.

Share This Page