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

XF 1.5 Excluding nodes from quick navigation

#1
Hi everyone,

how can I exclude child nodes of a certain forum (that has a massive list of subforums) from the quick navigation?

I guess I have to work with <xen:if> in this part of the quick_navigation_menu template, but can't get it to work... any tips on which code to include in which row? Very appreciated!!

Code:
          <xen:foreach loop="$nodes" value="$node">
             <li class="d{$node.depth} {xen:if "{$selected} == 'node-{$node.node_id}'", 'OverlayScroller'}">
               <a href="{xen:link {$nodeTypes.{$node.node_type_id}.public_route_prefix}, $node}"
                 class="{xen:if '{$node.node_type_id} == "Category"', 'OverlayCloser'} {xen:if "{$selected} == 'node-{$node.node_id}'", 'selected'}">
                 <span class="_depth{$node.depth} depthPad">{$node.title}</span>
               </a>
             </li>
           </xen:foreach>
 

Brogan

XenForo moderator
Staff member
#2
Untested.
Code:
<xen:foreach loop="$nodes" value="$node">
    <xen:if is="{$node.parent_node_id} != x">
    <li class="d{$node.depth} {xen:if "{$selected} == 'node-{$node.node_id}'", 'OverlayScroller'}">
        <a href="{xen:link {$nodeTypes.{$node.node_type_id}.public_route_prefix}, $node}"
        class="{xen:if '{$node.node_type_id} == "Category"', 'OverlayCloser'} {xen:if "{$selected} == 'node-{$node.node_id}'", 'selected'}">
        <span class="_depth{$node.depth} depthPad">{$node.title}</span>
        </a>
    </li>
    </xen:if>
</xen:foreach>
Change the x to the node ID of the parent forum.