Simple Navigation: different colours for each list item

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
ohemstock
Forum Members
Forum Members
Posts: 10
Joined: Wed Oct 12, 2016 4:05 pm

Simple Navigation: different colours for each list item

Post by ohemstock »

Hi, I would like to colour-coordinate the first level list items in the main navigation, specifically the a:hover and .menuactive behaviours. The intention is that I will be able to specify the a:hover and menuactive colour of each individual link.

It seems to me like I want to be able to say something like - if pagealias=contacts, then apply css class a:hover {color:#whatever;} and the same for menuactive

Can someone please suggest how to modify the "Simple Navigation" template prototype to do this?

Thanks a lot, Ollie
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Simple Navigation: different colours for each list item

Post by velden »

Consider using the page attributes 1-3 on the options tab while editing a page.

Read the help of the Navigator module to find out how to retrieve the values of those attributes.

That way you don't need to hard code the stuff into the Navigator template and it is very flexible.
ohemstock
Forum Members
Forum Members
Posts: 10
Joined: Wed Oct 12, 2016 4:05 pm

Re: Simple Navigation: different colours for each list item

Post by ohemstock »

velden wrote:Consider using the page attributes 1-3 on the options tab while editing a page.

Read the help of the Navigator module to find out how to retrieve the values of those attributes.

That way you don't need to hard code the stuff into the Navigator template and it is very flexible.
Thanks Velden, very helpful suggestion. Is there any way of pre-setting the extra attribute fields? Basically, so that for certain sections the field is pre-populated with the desired CSS classes?
Post Reply

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