Page 1 of 1

each item in menu with its own colors

Posted: Wed Jan 10, 2007 10:10 am
by bruco
Not sure I'm in the right section.  ???
Suppose that I want each item in first-level navigation menu with its own foreground color and background color.
If I had the following code, it should be easy to do such a task with CSS:

Code: Select all

<li id="item1"> <a href="omissis">Home Page</a></li>
<li id="item2"> <a href="omissis">Products</a></li>
<li id="item3"> <a href="omissis">Contacts</a></li>
Is there the possibility in CMS M S to distinguish each item in the navigation list to deal with differently?

Thanks for your attention.

Re: each item in menu with its own colors

Posted: Wed Jan 10, 2007 11:38 am
by cyberman
Yes, it's possible.

Create three CSS classes named 1, 2 and 3. Define foreground and background colors for that. Go to menumanager and import template simple_navigation and rename it to custom_navigation. Then transform one section of custom_nvigation like that from
{else}
url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->hierarchy}: {$node->menutext}
to
{else}
hierarchy}"[/color]>url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->hierarchy}: {$node->menutext}
Call menu like

{menu template='custom_navigation' number_of_levels='1'}

Re: each item in menu with its own colors

Posted: Wed Jan 10, 2007 12:21 pm
by bruco
cyberman wrote: Yes, it's possible.
Many many thanks. I will try as soon as possible.  :)