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

XF 1.4 little help to write correct code

Discussion in 'Styling and Customization Questions' started by jamalfree, Jan 15, 2016.

  1. jamalfree

    jamalfree Active Member

    hello please little help to write correct code:



    PHP:
    <xen:if is="{$Responsive}">

           <
    xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">     
           
    show this content
           
    </xen:if>
           
    <
    xen:else />

           <
    xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">     
           
    show this content 2
           
    </xen:if>
           
    </
    xen:if>
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. jamalfree

    jamalfree Active Member

    PHP:
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">

            <
    xen:if is="{$Responsive}">
            
    00
            
    <xen:else />
            
    11
            
    </xen:if>

    </
    xen:if>
    i try this code above responsive or not always i get 11!!!strangely
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You aren't using the correct conditional statement.
    Use this:
    Code:
    <xen:if is="@enableResponsive">
     
    jamalfree likes this.
  5. jamalfree

    jamalfree Active Member

    <xen:if is="@enableResponsive"> when i use this always i get 00!!!
     
  6. jamalfree

    jamalfree Active Member

    i wanna use condition in template footer not in css
     
  7. HWS

    HWS Well-Known Member

    There is no variable for the current viewport.
     
    jamalfree likes this.

Share This Page