Marcus Well-known member Oct 15, 2015 #1 Is this correct behavior? Or maybe this is a bug? sidebar_new_posts template returns "<ul> </ul>" when there are no threads to display.
Is this correct behavior? Or maybe this is a bug? sidebar_new_posts template returns "<ul> </ul>" when there are no threads to display.
Chris D XenForo developer Staff member Oct 15, 2015 #2 There isn't a contentcheck in place there. The template shouldn't be called at all if there are no threads. From the forum_list template: Code: <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" /> </div> </div> </xen:if>
There isn't a contentcheck in place there. The template shouldn't be called at all if there are no threads. From the forum_list template: Code: <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" /> </div> </div> </xen:if>
Marcus Well-known member Oct 15, 2015 #3 This is very logical and better than embed the sidebar_new_posts template within a contentcheck.