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.

Archive /

Our old forums are still available as a read-only archive.

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

Generate 2 different Navigations


Reply


4 Posts   1921 Views

Avatar
Synaps1s

8 Posts

18 October 2007 at 8:12am

Hi Everyone, im totally new to SilverStripe but already impressed about it. I really starting to loving this CMS, still im a totally newbie to this platform, i read the first 2 Tutorials, and made some custom Templates, but i have an simple problem, i want to have to different Navigations on one Page, NOT A 2ND Level Navigation but let say to Groups of Navigation, on for the Header, and another one for Footer.

The Problem is i don't know how to Group the Pages in CMS or how to make two different Navigataion Groups..
What i mean, when i generalte an list navigation based on the tutorial, this is fine, but let's say i want the last 3 links appear in an plaece in footer.. i could make this static, but i want to learn the possibilities of silverstripe.

Can anybody help out?

Avatar
Willr

Forum Moderator, 5513 Posts

19 October 2007 at 4:12pm

Edited: 19/10/2007 4:44pm

its messy but for a couple of sites I have done we needed a seperate footer menu (check out http://graphics.onslownet.school.nz for my example) so what I did in the cms is create a page called FooterMenu (might want to unselect 'ShowInMenus' and ShowInSearch as you dont want too many people actually going to this page :P) then adding children to that page of the Page Type 'Redirector'.

Then in the template you can control the children of that FooterMenu (I have cut out the extra HTML)

<% control ChildrenOf(FooterMenu) %>
<a href="$Link">$MenuTitle</a>
<% end_control %>

Its not pretty but it works :D

Avatar
Synaps1s

8 Posts

20 October 2007 at 12:06am

That's exectly what i thought in the first place, but was thinking there is some other nice way to do it, like setting a flag or id on the pages ;]

Thanks for help! Gotta do it the same way!

Avatar
newjamie

Community Member, 7 Posts

26 January 2008 at 7:50am

I need to do this in a way that is hierarchically correct in my site tree.

Is there not a better way to do this in SilverStripe now?

I could really use a solution!

Basically, My main nav appears in 6 places on my templates and need to split it up 6 ways to show it.

Thanks