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

XF 1.5 Conditional Tag on Forum Node and ALL of its children

Discussion in 'Styling and Customization Questions' started by Ivo Pereira, Oct 8, 2016.

  1. Ivo Pereira

    Ivo Pereira New Member


    I am looking for a way to get some stuff showing up using Template Conditionals.

    I was able to get something to display up on the Forum Node and the DIRECT children by using the following:

    <xen:if is="{$forum.node_id} == 166 OR {$forum.parent_node_id} == 166">
    <xen:include template="custom_template" />
    However I am looking to cover automatically every possible children of those direct nodes (like sub-sub-sub-nodes).

    Any ideas?

  2. Ivo Pereira

    Ivo Pereira New Member

    Any ideas how to achieve this?

  3. James

    James Well-Known Member

    I'm not sure this is possible in just templates without manually entering each id and child. As you've realised the parent id only shows the parent to the current node not the top level parent.
  4. Ivo Pereira

    Ivo Pereira New Member

    Thanks a lot @James .

    Too bad I have a lot of subforums (just for organizational purposes) and I would need to enter all the IDs... but as there are no other solution, I guess it will need to be.


Share This Page