Grav-plugin-admin: Modular Menus Not Working

Created on 15 Aug 2015  ·  6Comments  ·  Source: getgrav/grav-plugin-admin

Curious, I understand how Modular pages work, but what I don't get is why they take over the main menu. Here is what I want …
Home
. | Modular Page 1
. | Modular Page 2
. | Modular Page 3
About Page
Blog Page
. | Blog Post 1
. | Blog Post 2
. | Blog Post 3 … etc
Gallery Page
Contact Page
This isn't too dissimilar from the GetGrav site.
My site is off to a good start, BUT when I change the Home Page to a Modular template (to begin the modular creation process) it confiscates the Main Menu for its own sub-pages and the About, Blog, Gallery and Contact pages are no longer in the menu.

Also, this may be related too ...

The Display Templates (for Showcase, Feature and Text), to begin creating the modular sub-pages, do not show in the admin dropdown.

I am utilizing manual inheritance on the site, could that be an issue?

Most helpful comment

They don't actually 'physically' take over the menu. It's the antimatter theme that is displaying an on-page menu when you are on the modular page. This is actually a configuration option available on the page (not documented):

onpage_menu: false

Just put that in your modular.md page (ie home). and it will not replace the menu with the on-page menu

All 6 comments

They don't actually 'physically' take over the menu. It's the antimatter theme that is displaying an on-page menu when you are on the modular page. This is actually a configuration option available on the page (not documented):

onpage_menu: false

Just put that in your modular.md page (ie home). and it will not replace the menu with the on-page menu

Great! ... that did the job, the menus are working fine again.

However, I still cannot create Showcase, Feature and Text sub-pages for the home (modular) page (see above).

I know I could use the One-Page template, but I'd rather create all this by hand, also helps me learn Grav better.

The home page should be using a modular display template. Then when you edit it, it should look like this:

pages demo2 2015-08-14 18-58-52

Ya, mine looked like that, but it is when I try to add an actual Sub-Page that I don't get the choices of "Showcase, Feature and Text" options, like in the one-page skeleton. I thought something might have gotten corrupt so I started over with the skeleton and got everything to work for now. THX!

Hi, I'm not sure if we are talking about the same thing but is it possible to get both the main menu for regular pages and the on-page menu for modular sub-pages on the same site? It seems that now its one or the other.

@rhukster reply here https://github.com/getgrav/grav-plugin-admin/issues/72#issuecomment-131255657 is already answering. It's a theme configuration/decision thing. By default that's the current behavior. You can tweak the theme to display both, by changing its Twig file.

Was this page helpful?
0 / 5 - 0 ratings