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

XF 1.5 What does "xen:if is="{$threads}"" do?

Discussion in 'Styling and Customization Questions' started by daimpa, Feb 22, 2016.

  1. daimpa

    daimpa Member

    Hello, I'm upgrading XF and when mergin templates this piece of code appears in a blue section, with deleted at the end of it.

    <xen:if is="{$threads}">
                <div class="section threadList">
                    <div class="secondaryContent">
                        <h3><a href="{xen:link find-new/posts}">{xen:phrase new_posts}</a></h3>
                        <xen:include template="sidebar_new_posts" />
    What does the "deleted" word stands for? That I had deleted it in the older version of the theme?

    And also, what does this piece of code do? I've noticed that having it or removing it does no difference.

    Thanks :)
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The line in the title checks whether the $threads variable is populated, i.e. has data.

    If it does, the rest of the code runs, which is for the new posts block in the sidebar on the forum index.

    If it doesn't change anything when you remove it, then you could have the feature disabled in the options, or be using an add-on which displays the information instead.

Share This Page