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

Ivo Pereira

New member
Hello,

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:

HTML:
<xen:if is="{$forum.node_id} == 166 OR {$forum.parent_node_id} == 166">
<xen:include template="custom_template" />
</xen:if>

However I am looking to cover automatically every possible children of those direct nodes (like sub-sub-sub-nodes).

Any ideas?


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

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.

Thanks!
 
Top Bottom