Page 1 of 1

Apply style to one menu item

Posted: Thu Nov 16, 2006 3:58 pm
by skypanther
I'd like to apply a custom style to one item in my menu to make it stand out. I tried the lame hack of setting the menu text to Menu text but the tags are output as text not HTML. I can't see how to assign a CSS selector and short of custom coding my menu to do some hardcoded if...then processing, I don't see a way to accomplish my goal.

Suggestions?

Thansk,
Tim

Re: Apply style to one menu item

Posted: Thu Nov 16, 2006 9:29 pm
by Dr.CSS
If you add to the class, li and a, a{$node->id} in the Menu manager template, you will get the number a15 or whatever the number of the page is, then you can style it from there... the reason for the a in front of it is you get error mess. with just a number...

2.1: Beijing


2.2: Chengdu

{elseif $node->index > 0}
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
id}[/color]">current == true}
id}">haschildren == true}
id}">type == 'sectionheader'}
        id}"> {$node->menutext}
{elseif $node->type == 'separator'}
       
{else}
id}"><a

Re: Apply style to one menu item

Posted: Fri Nov 17, 2006 3:12 pm
by skypanther
Thanks for that tip Mark. As for the number thing, CSS rules say selector names must start with a letter.