Conditional to hide content on a page?

CTXMedia

Well-known member
I've checked the FAQ and couldn't see anything for this - I have created a page at the URL "/pages/advertise/" which displays my BuySellAds site details to potential advertisers - but I don't want ads shown on this specific page.

Is there a conditional to exclude "pages"?

Thanks,
Shaun :D
 
Would this not do it?

When working with arrays, the ! is placed just before the argument.
For example, <xen:if is="in_array({$forum.node_id}, array(x, y, z))"> for true, <xen:if is="!in_array({$forum.node_id}, array(x, y, z))"> for false.

Depending on the template being worked with, you may need to use $user instead of $visitor; $visitor is always the record for the current logged in user, $user is the record being processed (e.g. message author, member list, list of online users, etc.).

When working with the PAGE_CONTAINER template, you can pass variables from the view templates (category_view, forum_view,thread_view, etc.) using xen:container. The same applies to any templates which are included in the PAGE_CONTAINER template; the headeror ad_header templates for example.
To use the $forum.node_id variable for example, you would add this to the PAGE_CONTAINER template: <xen:container var="$forumId">{$forum.node_id}</xen:container>.
Similarly for the $threadId variable, you would add this: <xen:container var="$threadId">{$thread.thread_id}</xen:container>.

EDIT: and then use the node_id of the page you just created?
 
replace 3 with the page node ID that you need to do something for or avoid doing something for..
you need to wrap the second one around your ads


if is
HTML:
<xen:if is="{$page.node_id} ==3">
 
    blah blah
 
</xen:if>

if is not
HTML:
<xen:if is="{$page.node_id} !=3">
 
    blah blah
 
</xen:if>




thought I would let you know...I could not find the opening body tag on any page in your site
 
thought I would let you know...I could not find the opening body tag on any page in your site

Thanks (y) - I hadn't noticed, but somewhere along the line I've removed this line from the PAGE_CONTAINER template:

Code:
<body{xen:if {$bodyClasses}, ' class="{$bodyClasses}"'}>

Suffice to say it's back in there now ... ;)
 
Top Bottom