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

Using a Bootstrap dropdown menu to jump to modular page sections?

Started by Muut Archive 11 years ago · 2 replies · 925 views
11 years ago

I have a page called "Resources", which is a modular page contain a rather large number of modular items (folders). I'd like to utilize a dropdown menu in the navigation bar which includes the page titles of these module page chunks as dropdown menu items.

With my existing knowledge level I can do the above but only by try to hardcode the page items and menu items - obviously not ideal.

Would something like this be feasible programmatically within a Twig file, and if so are there any similar examples I could learn from?

Thanks very much,
Paul

11 years ago

You can look at Antimatter's modular.html.twig file to see how this is being done in the OnePage Skeleton:

https://github.com/getgrav/grav-theme-antimatter/blob/develop/templates/modular.html.twig

Demo of it in action here

BTW, we're currently in the process of adding much of the advanced functionality of Antimatter to both Bootstrap and Afterburner2 theme.

Discussion is happening on our Gitter chat as Gertt is leading this charge.

11 years ago

Thanks very much Andy, I will further review and try to digest it all.

Awesome to hear that the Bootstrap theme is getting more love with some updated functionality! With Bootstrap being open source, so well documented, and such a large community Bootstrap is a popular multi-device framework in the educational space (I am trying to use Grav to build a multi-device friendly course companion).

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1321 9 years ago
Archive · by Muut Archive, 9 years ago
2 916 9 years ago
Archive · by Muut Archive, 9 years ago
2 4047 9 years ago
Archive · by Muut Archive, 9 years ago
1 2921 9 years ago
Archive · by Muut Archive, 9 years ago
3 1105 9 years ago