Jump to:

23367 Posts in 18143 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » menu display

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: 1199 Views
  • Briohny
    Avatar
    Community Member
    199 Posts

    menu display Link to this post

    I have a drop down menu. With one of the menu items, i don't want the second menu to drop down. I can solve this by selecting the 'don't show in menu' checkbox.

    However i also have a sidebar menu(2) where I DO want these second level items to be visible. If i select the checkbox as above, they also disappear from the sidebar menu.

    Is there any way that i can not have them displayed on the header drop down menu but do have them displayed in the sidebox?

    Many thanks.

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: menu display Link to this post

    if you tick off the Show in menus option you will not get them in the navigations anyway. you can do something to get the second level stuff on the website, add a function similar to this on your mysite/Page.php

    function SecodLevelPages(){
    return DataObject::get("Page","ParentID = [the id of your main page]")
    }

    you can get the results through a .ss file with the following.

    <ul>
    <% control SecondLevelPages %>
    <li><a href="$Link">$MenuTitle</a></li>
    <% end_control %>
    </ul>

    I hope this will help you.

    1199 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.