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

Navigation for both modular and standard pages

Started by Muut Archive 9 years ago · 5 replies · 1268 views
9 years ago

Hello, I am trying to modify default Antimatter theme to have navigation for both modular and standard pages, i.e. such structure:

TXT
01.Home/_page1
01.Home/_page2
01.Home/_pageN
02.Page
03.Page
N.Page

and to be able to see in menu all pages modular and standard and navigate among them freely. I experimented with page collections but no success. Any help/ideas/examples?

9 years ago

Hello flaviocopes, first I'd like to stress that I started to use Grav and I really like it, thank to the folks who build it. Now I'm fiddling around with the same issue above. I read and tweak the twig files, but I think there must be a simpler solution. It seems you know it. Can you explain how to switch the menu to the modular child list. I searched for something like that but obviously I missed it. Thank You in advance.

BTW in this forum I'm missing the date of the posts.

9 years ago

What is the need? You want, on a modular page, the normal menu, and beside it, the menu of the on-page sections? Make a screenshot so I can visualize it

9 years ago

Exactly, that's what I'm looking for. Can't visualize it at the moment, but if you still need it, I can do it tomorrow.

9 years ago

Hello flaviocopes,
here is a visualization of what I'm looking for:

TXT
____________________________________________________

menubar           on-page-1   on-page-2   other-page
____________________________________________________

on-page-1

blabla etc.

on-page-2

even more blabla

on-page-* are the menu items/anchors of the modular pages of the current page, other-page is the menu item, which links to another page.

I hope, this makes my point clearer. Meanwhile I was looking at the bootstrap theme's modular.html.twig template, which gave me a hint in using module.active to access the modular files for creating a menu item, but I'm still struggling to get all together working.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1334 9 years ago
Archive · by Muut Archive, 9 years ago
2 924 9 years ago
Archive · by Muut Archive, 9 years ago
2 4055 9 years ago
Archive · by Muut Archive, 9 years ago
1 2938 9 years ago
Archive · by Muut Archive, 9 years ago
3 1111 9 years ago