XF 2.0 PAGE_CONTAINER <head> modification - prevent code from loading on certain templates

DarkIce2

Member
Hey, I have modified the HTML <head> section my PAGE_CONTAINER to have the Google Auto Ads code. However, wondering if there is a way to have some type of "xen if" statement around the code block to stop it from loading on these templates:

error
login
login_password_confirm
login_two_step
message_page
register_complete
register_connected_account
register_confirm
register_form

How can this be done? Is there a better way to do what I'm trying to do? I can't see how to do in the "Advertising" system because the code block needs to be in the HEAD section
 
Hi @Brogan

tried this but doesn't appear to be working

Code:
<xf:if is="!in_array({$contentTemplate},'error','login','login_password_confirm','login_two_step','message_page','register_complete','register_connected_account','register_confirm','register_form')">

please advise,thx
 
Last edited:
Found working solution, thanks @Slavik

Code:
<xf:if is="!in_array({$template}, ['error','login','login_password_confirm','login_two_step','message_page','register_complete','register_connected_account','register_confirm','register_form'])">
 
Last edited:
on related topic... i am trying to disable auto ads from appearing on specific nodes and threads inside it.

<xf:if is="$forum.node_id != 116"> does not seem to work for me. i am using it in page container.
 
Back
Top Bottom