By charleyramm on
Hi,
I want to add a CSS class to menu items based on a CCK field called 'page type'. If the page type is 'a' the class should be .green, and if the page type is 'b' the class should be .brown.
Much appreciated,
Hi,
I want to add a CSS class to menu items based on a CCK field called 'page type'. If the page type is 'a' the class should be .green, and if the page type is 'b' the class should be .brown.
Much appreciated,
Comments
I would probably use the
I would probably use the 'page type' to add a class to the body tag and then use that to apply css to the 'a' tags. What does the body tag look like in your themes page.tpl.php file?
Hi, I don't think that
Hi,
I don't think that helps. Sorry if I didn't explain my self properly. What I'm trying to achieve is this:
When the menu is generated:
if (menu.item.pagetype == 'a'){
menu.item.class = 'green'
}
if (menu.item.pagetype == 'b'){
menu.item.class = 'brown'
}
So type 'a' pages will be green in the menu, and type 'b' will be brown.
Hi, Is it acceptable to BUMP
Hi,
Is it acceptable to BUMP here?