[RSS Feed/News] Condition to show ads in specific nodes and their children

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
I would like to show an ad on position Thread view: Above message list - but only in specific nodes (10, 20, 50) including their children.

I could do this with
Code:

Code:
<xf:set var="$nodeIds" value="{{ array_keys($thread.Forum.Node.breadcrumb_data) + [$thread.node_id] }}" />
<xf:if is="in_array(10, $nodeIds) || in_array(20, $nodeIds) || in_array(50, $nodeIds)">Advert in Node IDs 10, 20 and 50 and their children</xf:if>

But this feels really awkward & kinda inefficient.

Does anybody...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom