• 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


Active member
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?
<xen:if is="!{$page.node_id} == ???">
Thanks for your help :)


XenForo moderator
Staff member
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:
{xen:helper dump, $page}
If that returns NULL, it's not available.


Active member
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?


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