XF 1.2 Conditional to check if forum is sub forum of another forum?

Razasharp

Well-known member
Is there a conditional to check that a forum is a sub forum of another forum?

If not is there a conditional I can use to check that the forum is in an array of forum IDs? First one would be ideal as it means I won't have to manually update the conditional each time a new sub forum is added.

Thanks in advance.
 
Try this: <xen:if is="in_array({$forum.parent_node_id}, array(x, y, z))">

I'm trying to use a conditional in one of the ad_ templates which I've been doing without issue until I tried to apply one to a forum ID with double digits.

If I do this it works fine: <xen:if is="{$forum.node_id} % {$xenOptions.messagesPerPage} == 6 AND !{$message.conversation_id}">

but this isnt working:

<xen:if is="{$forum.node_id} % {$xenOptions.messagesPerPage} == 86 AND !{$message.conversation_id}">
 
Back
Top Bottom