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

XF 1.4 if Condition for Node & Sub-Nodes

#1
I'm trying to display an ad in a specific node and all its sub-nodes in total there are 22 sub-nodes.

This is what I have and it works but I have to specify each sub-node and the condition statement is really long. Is there a better more efficient way of doing this that I'm unaware of? Like a condition that would cover all sub-nodes under a parent node instead of listing each one?

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND {$thread.reply_count} > 0 AND {$forum.node_id} == 37 OR 59 OR 57 OR 43 OR 52 OR 30...etc">
(ad code)
</xen:if>
Thanks!