Textpattern Forum

You are not logged in. Register | Login | Help

#1 2012-02-26 20:51:49

FireBot
New Member
Registered: 2012-02-26
Posts: 4

if_article_category to apply class to a parent category in a list

On sub-category pages like this one: http://www.polyworld.com.au/1-products/?c=poly-trolys I am trying to have the parent category have class=selected applied to the list element in the sidebar menu.

I have the following code, which I’ve tried to adapt to work on sub categories. The problem I’m having is targeting the parent category in the list.

Sidemenu code: http://pastebin.com/AYQnB5Q2

Right now, the code only works for applying the class to the page in the menu you’re currently on (which works for non-sub menu pages just fine).

I appreciate any help!

Offline

#2 2012-02-26 21:02:33

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 1,918
Website

Re: if_article_category to apply class to a parent category in a list

Try smd_parent.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2012-02-29 06:44:34

FireBot
New Member
Registered: 2012-02-26
Posts: 4

Re: if_article_category to apply class to a parent category in a list

I think that may be what I want, but I’m confused as to how to tie it in with the “if” statements I have at the moment. I’m a little in over my head with this one I think, so the more an explanation can be simplified the better. I’ll keep messing around with it in the mean time.

Offline

Board footer

Powered by FluxBB