Hello,
how can i make several menu's?
For example:
One top menu in a horizontal bar AND one the bottom of the page...
When i make a page i would love to have the option to select the menu this page should show up.
Can some help me out with this?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
Hello,
how can i make several menu's?
For example:
One top menu in a horizontal bar AND one the bottom of the page...
When i make a page i would love to have the option to select the menu this page should show up.
Can some help me out with this?
It's not possible in itself to have 2 menus in SS but with a little tweaking and organization it can be done. First you need to setup your site to have a "Menus" node. Hide that node so it doesn't show in MENU(1).
Then, create a "TopMenu" and "LeftMenu" page under that. Now all items under those menus will be the pages to appear under those menus. So you could have:
SiteContent
- Menus
- - TopMenu
- - - Item1
- - - Item2
- - - Item3
- - - Item4
- - LeftMenu
- - - Item1
- - - Item2
This will create a structure for later, now the template:
In your template, you'd have to do this:
control Page('LeftMenu')
control Children
<a href="">...</a>
end_control
end_control
This portion will load the page "LeftMenu" and you can easily do it for "TopMenu" too. Then using a control Children, you can loop all the children items.
Was that clear?
That's really clear....
I will come back to you on that, when i am tweaking the design!
Thanx man.
P.s this could be in SS itself obviously.