Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Menu improvement


Go to End


10 Posts   6138 Views

Avatar
Sigurd

Forum Moderator, 628 Posts

20 April 2007 at 1:44am

pounder. There's lots of ways to skin this cat. One (without checking my code, so excuse any typos, is)

<ul id="MainMenuHolder">
....
<a href="...." class="menu_$ID">
....
</ul>

and then your css have

.MenuHolder A { default menu style }
#menu_home {}
#menu_about {}
#menu_contact {}

You could even make a new field inside the CMS, like "menutheme", and this might be a text box, or a dropdown, and thereby specify "red" or "blue" in terms of values, which you use in the same way as my code above... either defining exact CSS classes, background images, etc.

Avatar
pouderStream

Community Member, 33 Posts

25 April 2007 at 9:07pm

This is some nice solution, tnx.
That could be used somewhere else too ;)

Go to Top