Jump to:

23493 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Several menu's

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: 780 Views
  • raamklaza
    Avatar
    Community Member
    182 Posts

    Several menu's Link to this post

    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?

  • CDGIDev
    Avatar
    Community Member
    9 Posts

    Re: Several menu's Link to this post

    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?

  • raamklaza
    Avatar
    Community Member
    182 Posts

    Re: Several menu's Link to this post

    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.

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