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

Conditionals... again

Discussion in 'XenForo Questions and Support' started by Ray, Apr 11, 2011.

  1. Ray

    Ray Active Member

    I need to display a message in the first post of every thread in all forums, except forum 1, 2, and 3.

    Thanks :)
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Use this condition:

    <xen:if is="{$post.position} == 0 AND !in_array({$thread.node_id}, array(1,2,3))">
    Or this one will show in the first post on every page of the thread (as opposed to just the first page like the previous condition):

    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !in_array({$thread.node_id}, array(1,2,3))">
    edit - these conditions work in the post and message templates. Or you can use the ad_message_body template which is more convenient.
    Young and Ray like this.
  3. Ray

    Ray Active Member

    Thank you very much :)

Share This Page