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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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   5277 Views


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">

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.


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