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

XF 1.5 Watched Forums list - in each <li> how toinclude the top category node_id or all the parent node_ids

Stuart Wright

Well-known member
#1
Hi folks,
I style our forum list so that (when there are unread posts) each forum adopts the colour of it's top level parent category for a font awesome folder icon.
https://www.avforums.com/forums/
This is nice for differentiating each category throughout the forums.
I do it using styling of the top level parent categoriy node IDs:
For example the blue of our home entertainment category:
Code:
.node_495 .nodeList li .unread .nodeText .nodeTitle a:before {color: @avfHomeEnt;}
But it doesn't work for the Watched Forums page because the parent category node_id is not included in the styling anywhere in the node_forum_level_2 template
It's this line I'm referring to
HTML:
<li class="node forum level_{$level} {xen:if '{$level} == 1 AND !{$renderedChildren}', 'groupNoChildren'} node_{$forum.node_id}">
specifically before node_{$forum.node_id} I need to ideally add the top level category of the forum or failing that, all the parent nodes in order.

How hard would that be?
Thanks.
 

Chris D

XenForo developer
Staff member
#2
Unfortunately it's likely not possible without custom development.

The best you will get is {$forum.parent_node_id} which might be the top level category ID depending on how the node tree is laid out.