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.

Template Questions /

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

Second individual menu/navigation


Go to End


2 Posts   2180 Views

Avatar
langhauserit

Community Member, 1 Post

21 January 2012 at 5:06am

Hey Guys,

i do the first migration from a website to SilverStripe CMS and i need your help for a individual menu/navigation.

My normal navigation in the header and the submenu navigations works fine, but i need a third navigation in the footer. The heaviness is that i need to select which menu item will be shown in the footer navigation. So maybe there will be different selections for the main and the footer navigation. The menu item "Home" is shown in the main navigation but we won't show it in the footer navigation. In the other way i can use the selectbox "don't show in menu" so that a menu item will be shown in the footer navigation but not in the main navigation. I already tried the special menu (http://bit.ly/zuDW8F), but i can't use children in there.

I hope you can help me.

Thanks and Greetings from Munich.
Oliver

Attached Files
Avatar
martimiz

Forum Moderator, 1391 Posts

23 January 2012 at 6:18am

Edited: 23/01/2012 6:19am

What I usually do is create a boolean AddToFooterMenu to the Page class, and create a checkbox field for it in the CMS.

IF the only thing needed is a single layer footermenu, I just create a getFooterMenu() function in the Page_Controller that returns a DatObject::get of all pages where AddToFooterMenu = false... In a multlayers itemap kind of menu you could also do a <% if AddToFooterMenu %> in your templates menu control loops...