XF 2.0 Excluding froums from showing advertisments

Fethi.dz

Well-known member
Hi,

Happy New Year :giggle:

I tried to exlude the advertisment block to be shown in some forums by doing the following:

ACP->Setup->Advertising

I have added a new advertisment block and in it for testing I put this code.

PHP:
<xf:if is="!in_array({$forum.node_id}, [2, 3])">
Hello, Happy New Year ^^
</xf:if>

I used {{ dump(vars()) }} to make sure that the params are available but same issue no luck to hide the ads from the specific forums.


Is there something wrong in my code??
 
The node_id isn't available in that position in all templates.

If you are attempting to target nodes, you should use a position specific to nodes, not a global position.
 
Back
Top Bottom