XF 1.5 Conditional Statements on Page Node

JordanH

Well-known member
The only other thread I could find similar is @CyclingTribe's thread. Which was never given an answer that worked.
https://xenforo.com/community/threads/conditional-to-hide-content-on-a-page.43698/
Funny too, as I am actually literally doing what he was trying to do and trying to hide my ads on my advertisement page.

As I'm most common with Conditional Statements, I figured I would just use those. However, it appears Conditional Statements don't work on XenForo pages at all. At least not with what I'm trying to do.

So I was wondering, how would I go about hiding content on a XenForo Page (/pages/name). I can't use CSS and use "display: none;" because that is against Google's Adsense TOS.
 
Last edited:
What about:

Code:
<xen:if is="{$quickNavSelected} != 'node-55'">

or an array:

Code:
<xen:if is="!in_array({$quickNavSelected}, array('node-XX','node-XX'))">
 
What about:

Code:
<xen:if is="{$quickNavSelected} != 'node-55'">

or an array:

Code:
<xen:if is="!in_array({$quickNavSelected}, array('node-XX','node-XX'))">
Ha ha thanks russ :)
I was actually just reading @Brogan's thread about removing bread crumbs here:
https://xenforo.com/community/threa...ional-for-a-specific-node-in-a-template.8935/
And it produced the same fix.

That seemed to have worked :)

My this is getting to be long xD
Code:
<xen:if is="!in_array({$contentTemplate}, array('forum_list', 'member_view', 'adcredit_shop_category_list', 'adcredit_shop_category_view', 'message_page', 'error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results', 'register_form', 'register_facebook', 'register_twitter', 'register_google', 'login', 'error_with_login', 'contact')) AND {$quickNavSelected} != 'node-171'">
 
Code:
<xen:if is="!in_array({$contentTemplate}, array('forum_list', 'member_view', 'adcredit_shop_category_list', 'adcredit_shop_category_view', 'message_page', 'error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results', 'register_form', 'register_facebook', 'register_twitter', 'register_google', 'login', 'error_with_login', 'contact')) AND {$quickNavSelected} != 'node-171'">

Can you please tell me, how i can make it work on xF2, i tried but not working by changing tag xen to xf
 
Top Bottom