XF 1.2 Hiding elements depending on page name

onlineuk

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

Andy
 
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:

domain.com/pages/advertise

and

domain.com/pages/contact-us

would that still require the array to be 'contact-us','advertise' ?
 
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/')">

</xen:if>

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