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

Multiple navbars

Started by Muut Archive 10 years ago · 6 replies · 402 views
10 years ago

I'm having a bit of trouble trying to make my navbar change based on what page is being viewed. I want a white navbar to display when the user is on a page in the root directory, and I want the <li> elements in my navbar to loop through pages only in the root directory.

When the user is on a page in one of my folders, I want a black navbar to display (with a different logo), and I want the <li> elements to loop through the pages only in that folder.

How should I approach this problem? Thank you so much for your time.

10 years ago

It's totally doable. I'll have to work up a code sample for you. Bit late to do it now :)

10 years ago

Well that's a bit specific. I will do up an example of a traditional split menu where the secondary menu shows the items directly under the top level as this will be more helpful to others.

10 years ago

Hi rhukster, any chance you have the split menu example ready?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1360 9 years ago
Archive · by Muut Archive, 9 years ago
2 939 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2958 9 years ago
Archive · by Muut Archive, 9 years ago
3 1122 9 years ago