XF 1.2 Stop Adsense ads appearing on XF error pages?

CTXMedia

Well-known member
I'm currently only displaying ads to guests so have a conditional wrapped around the Adsense code:

<xen:if is="!{$visitor.user_id}">

How would I expand on this to ensure ads are not displayed on error pages that XF generates?

Thanks,
Shaun :D
 
Could someone please help me?

I had:

Code:
<xen:if is="{xen:helper ismemberof, $visitor, 1, 84}">

And replaced it by:

Code:
<xen:if is="!in_array({$contentTemplate}, array('error', 'search_form', 'search_form_post', 'search_form_profile_post', 'xengallery_search_form_media', 'search_results', 'register_form', 'login', 'error_with_login', 'thread_view', 'cta_overtaking_index'))">



How can I merge these two statements?

Thanks!
You don't need to merge them, you simply nest them.

Code:
<xen:if is="{xen:helper ismemberof, $visitor, 1, 84}">
<xen:if is="!in_array({$contentTemplate}, array('error', 'search_form', 'search_form_post', 'search_form_profile_post', 'xengallery_search_form_media', 'search_results', 'register_form', 'login', 'error_with_login', 'thread_view', 'cta_overtaking_index'))">
....
....
....
</xen:if>
</xen:if>
 
Top Bottom