XF 1.2 Hiding elements depending on page name


New member
Hi all,

I currently have a welcome box on my forum that shows for anyone that is a visitor, once logged in it disappears.

Is there also a way to get this so that it doesn't show on particular pages (in this example, contact and advertise).

Many thanks



New member
Thanks for the speedy reply @Brogan, I've given it a go, done a little more research before hassling but am struggling to implement this.

If, when I'm on the pages in question and my domain in the address bar is as follows:




would that still require the array to be 'contact-us','advertise' ?

Jake Bunce

XenForo moderator
Staff member
Page nodes all share the same contentTemplate.

This alternative condition may be desirable if you wish to exclude some but not all page nodes:

Rich (BB code):
<xen:if is="!in_array({$requestPaths.requestUri}, array('/pages/advertise/', '/pages/contact-us/')">

Matching the requestUri is more precise than using the contentTemplate, but it is also somewhat crude.