Editing 'simple_navigation.tpl' with own styles!

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
smriyaz
New Member
New Member
Posts: 7
Joined: Thu Oct 09, 2008 9:43 am

Editing 'simple_navigation.tpl' with own styles!

Post 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
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm

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

Post 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?
Mich-adg
Forum Members
Forum Members
Posts: 200
Joined: Sat Aug 02, 2008 9:08 pm

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

Post 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}">
Post Reply

Return to “Layout and Design (CSS & HTML)”