1. 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

Discussion in 'Styling and Customization Questions' started by Stuart Wright, Aug 4, 2016.

  1. Stuart Wright

    Stuart Wright Well-Known Member

    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.
    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:
    .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
    <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?
  2. Chris D

    Chris D XenForo Developer Staff Member

    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.
  3. Stuart Wright

    Stuart Wright Well-Known Member

    Ok, thanks for the reply, Chris.

Share This Page