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

XF 1.4 Hide content in first post

Discussion in 'XenForo Questions and Support' started by CentOS 6, Apr 20, 2015.

  1. CentOS 6

    CentOS 6 Member

    What conditional statement do I have to use to hide content in first post only?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You can use $post.position.
     
  3. CentOS 6

    CentOS 6 Member

    I'm trying to hide 'Reply' in first posts only
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You would need to edit the post template and edit <xen:if is="{$canReply}"> adding the additional conditional statement - the numbering starts from 0.
     
  5. CentOS 6

    CentOS 6 Member

    Decided to post this for others....

    Code:
        <xen:if is="{$post.position} != 0">
                    <xen:if is="{$canReply}">
                        <xen:if is="{$xenOptions.multiQuote}"><a href="{xen:link threads/reply, $thread, 'quote={$post.post_id}'}"
                            data-messageid="{$post.post_id}"
                            class="MultiQuoteControl JsOnly item control"
                            title="{xen:phrase toggle_multi_quote_tooltip}"><span></span><span class="symbol">{xen:phrase multiquote_add}</span></a></xen:if>
                        <a href="{xen:link threads/reply, $thread, 'quote={$post.post_id}'}"
                            data-postUrl="{xen:link posts/quote, $post}"
                            data-tip="#MQ-{$post.post_id}"
                            class="ReplyQuote item control reply"
                            title="{xen:phrase reply_quoting_this_message}"><span></span>{xen:phrase reply}</a>
                    </xen:if></xen:if>
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    You could also combine the two into a single xen:if if you wanted to.
     

Share This Page