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

XF 1.5 Remove postbit for first post in a certain forum

Discussion in 'Styling and Customization Questions' started by adwolf1, Feb 1, 2016.

  1. adwolf1

    adwolf1 Active Member

    odd case, but wondering if this is possible --

    what would the template conditional be to remove the postbit from the first post of a thread, if the thread exists in a certain forum? Any easy way to do that?

  2. Brogan

    Brogan XenForo Moderator Staff Member

    <xen:if is="{$forum.node_id} == 1 AND {$thread.first_post_id} == {$message.post_id}">
    Change the 1 to the node ID.

    That assumes $forum, $thread and $message are all available in the template you are editing.
  3. adwolf1

    adwolf1 Active Member


    would message_user_info have all those variables available? I'm just trying to get rid of the MessageUserInfo block on first posts in certain forums.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You can check if a variable is available by adding this to the template:
    {xen:helper dump, $variable}
    If it returns an array then it's available, otherwise it if returns NULL it's not available.

Share This Page