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.

General Questions /

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

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

menu display


Go to End


2 Posts   1715 Views

Avatar
Briohny

Community Member, 199 Posts

27 April 2009 at 3:32am

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.

Avatar
Nivanka

Community Member, 400 Posts

29 April 2009 at 4:13am

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.