Apply style to one menu item

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
skypanther

Apply style to one menu item

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Apply style to one menu item

Post 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
skypanther

Re: Apply style to one menu item

Post by skypanther »

Thanks for that tip Mark. As for the number thing, CSS rules say selector names must start with a letter.
Locked

Return to “CMSMS Core”