Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Condition on detail page and root category

Quote Reply
Condition on detail page and root category
Hi,

Is it possible to obtain the root category on the detail page?

I currently have :
home > cat1 > subcat1.1 > subcat1.1.1...
home > cat2 > subcat2.1 > subcat2.1.1...

...and I would like to use an condition on the detail page :

if cat1 or cat2 {}
else {}

Thanks for your suggestion.

Mick

Last edited by:

MJ_: Apr 9, 2012, 3:09 AM
Quote Reply
Re: [MJ_] Condition on detail page and root category In reply to
If its on the detailed page, you should be able to use the title_loop values.

First of all test it - try:

Code:
<%title_loop.1.Name%>

(it may be "1" or "2"... I can't remember if it starts at 0 or 1 , and the first element is the "home" value :))

Then if that works you should be able to do:

Code:
<%if $title_loop.1.Name eq "The Cat Name%> ... do something <%endif%>

Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Condition on detail page and root category In reply to
Hi Andy,

Thanks again, it is perfect as always ! :)

Mick