Page 1 of 1

Editing 'simple_navigation.tpl' with own styles!

Posted: Mon Oct 13, 2008 12:18 pm
by smriyaz
Hi there,
I'm a newbie to CMSms. I'm trying to convert a site to cmsms last few days. I want to just create a basic css menu (with ul & li) and give my own styling. I've attached the menu manager with a default 'simple_navigation.tpl' in the template and thats fine for me. I need to make each 'li' in the navigation with my own styles (say different colors for each li). and I can see that the links are generated with the page alias. My question is, Is there a way to assign styles to the 'li' items using this page alias? for example if I want to give a different style to my second link 'about us' can I create a class using the alias name 'about-us' and assign it to the particular link? How can I edit the simple_navigation.tpl file? Is there any tutorials around for this?

Thanks in advance. :)
S.M.Riyaz

Re: Editing 'simple_navigation.tpl' with own styles!

Posted: Mon Oct 13, 2008 1:53 pm
by Russ
You could use the page alias as a class in the template and then code the CSS ? Or use the menu numbering as a class?

Re: Editing 'simple_navigation.tpl' with own styles!

Posted: Fri Oct 24, 2008 10:24 am
by Mich-adg
Hi,

yes you can, here an example where i call a specific image on the background of the li :

Code: Select all

<li style="background: url(images/design/{$node->alias}.jpg) 0 0 no-repeat">
So for a simple class it will be :

Code: Select all

<li class="{$node->alias}">