• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Conditional Statements with URL portions

NinaMcI

Active member
#1
Hi,
I've been trying to hide the content of an ad_ template from a page node.
However the page node has a URL portion instead of a node ID.
How do I write conditional statements where there is no node ID?
Code:
<xen:if is="!{$page.node_id} == ???">
Thanks for your help :)
 

Brogan

XenForo moderator
Staff member
#2
The node ID still exists in code, it just isn't exposed to the URL.

Which ad template are you adding that to?
The $page param may not be available there.
You can check using:
Code:
{xen:helper dump, $page}
If that returns NULL, it's not available.
 

NinaMcI

Active member
#5
I've added it to template ad_above_top_breadcrumb and then saved it.
When you say load the page, what page are you referring to?
 

NinaMcI

Active member
#8
Found it!
I added
Code:
<xen:container var="$page.node_id">{$page.node_id}</xen:container>
to the pagenode_container template.