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

Restoring the subheading for subforums

yoghurtfarmer

Well-known member
#1
Like in previous versions as illustrated below:
subforum.png

I can get one to appear in RC1 by adding the following to node_forum_level_2:
<xen:if is="{$level} == 2"><div class="categoryStrip"></div></xen:if>

but this results in the extra sub-headings on the forum list. Is there a conditional that I can use to make it exclude the forum list nodes? eg: if is = $child..$subforum...$threadlist etc.
 

Jake Bunce

XenForo moderator
Staff member
#2
I am not sure I understand exactly what you are doing, but I think you want a condition like this:

Code:
<xen:if is="{$level} == 2 AND {$forum.parent_node_id}"><div class="categoryStrip"></div></xen:if>
Or maybe you want the opposite, !{$forum.parent_node_id}:

Code:
<xen:if is="{$level} == 2 AND !{$forum.parent_node_id}"><div class="categoryStrip"></div></xen:if>
{$forum.parent_node_id} is false at the top of your node tree, and is true for all node listings below the index page.
 

yoghurtfarmer

Well-known member
#3
Thanks but it didn't work. Basically I want to restore the categoryStrip bar for sub-forums.

I'm using the following for now (where 5, 7, 10 and 23) are the nodes that I want a categoryStrip over, but it's not ideal.

<xen:if is="{$forum.node_id} == 5
OR {$forum.node_id} == 7
OR {$forum.node_id} == 10
OR {$forum.node_id} == 23
"><div class="categoryStrip"></div></xen:if>
 

Mike

XenForo developer
Staff member
#6
You're likely to have to deal with a "hacky" version, as the changes that were made do make detecting that situation a little harder. (The changes that were made mean that only one level of sub-forums is shown when viewing a forum.)
 

Jake Bunce

XenForo moderator
Staff member
#7
Ok I see what you are doing. I don't see anything to distinguish those two forums for use in a conditional.

One possible solution is to use display orders. If you manage your display orders tightly then the top level forums will always be 1 in which case you can single them out with a condition like this:

Code:
<xen:if is="{$level} == 2 AND {$forum.display_order} == 1"><div class="categoryStrip"></div></xen:if>