Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Multiple menus

Started by Muut Archive 10 years ago · 2 replies · 1443 views
10 years ago

Hey ther. Grav newbie here.

I'm just playing around with my localhost install and am trying to work out how to create multiple menus. The helium theme has a dropdown to select menus but I can't work out how to populate it -only 'default', 'primary' etc. can it be done in the admin? Or Is this done with directories/file structure? Yaml config?

Tx.

10 years ago

Menus are really just a way to displaying your page structure. So you could create two distinct folder trees under user/pages and then just start displaying one menu based on the first branch, etc first-menu that actually lives in user/pages/01.first-menu/ and then a second menu that starts iterating overs pages for second-menu, ie user/pages/02.second-menu.

If you look in the Antimatter theme, you can see that the menu (although just a single menu) starts at the root node / and then loops over the children. So just start at /first-menu node.

10 years ago

Thanks for that - I'll have a play when I get a minute.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1662 9 years ago
Archive · by Muut Archive, 9 years ago
2 1123 9 years ago
Archive · by Muut Archive, 9 years ago
2 4282 9 years ago
Archive · by Muut Archive, 9 years ago
1 3162 9 years ago
Archive · by Muut Archive, 9 years ago
3 1286 9 years ago