Jump to:

23358 Posts in 17875 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Second Level Nav

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 761 Views
  • unicorn7
    Avatar
    Community Member
    9 Posts

    Second Level Nav Link to this post

    Hi Gang

    Just about to implement the second level nav which looks pretty easy. I am keen to have the off state graphic for each of my second level items to be an independent graphic i.e. green for the first listed item, blue for the second etc. I am happy for the over state and the on state to be the same colour for each. my products are colour coded so it would help users if they could see the colour to help identify. once they are on the page the colour will be obvious in the background image so the on state can resort to one of the two company brand colours.

    is this easy (does any code exist for this function) or do i need to know a fair bit about php to instigate such a thing?

    cheers
    unicorn7

  • zenmonkey
    Avatar
    Community Member
    527 Posts

    Re: Second Level Nav Link to this post

    Well the easiest way would be to add that graphic or option to your DataObject. That way you could just call the optional graphic or CSS class from Children Control.

    <ul>
    <% control Menu(1) %>
    <li><a href="$Link">$MenuTitle.XML</a>

    <% if Children %>
    <ul>

    <% control Children %>
    <li><a href="$Link" class="$CssOption">$MenuTitle.XML</a></li>
    <% end_control %>

    </ul>
    <% end_if %>

    </li>
    <% end_control %>
    </ul>

  • unicorn7
    Avatar
    Community Member
    9 Posts

    Re: Second Level Nav Link to this post

    thanks Zenmonkey

    I'll give your advice a test run on my staging server once I have the site up and running with the standard menu look.

    much appreciated.

    unicorn7

    761 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.