New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modular pages, no menu links in hamburger navigation #421

Closed
schml opened this Issue Feb 8, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@schml
Copy link

schml commented Feb 8, 2016

Hi there,

how do i get the horizontal menu from modular pages to the hamburger navigation?
grav_hamburger_navi

greetings, Chris

@rhukster

This comment has been minimized.

Copy link
Member

rhukster commented Feb 8, 2016

This is not a bug, those links in the horizontal menu are an on-page menu that is generated by the modular sections. It really makes no sense to have those view in the 'mobile' menu because you are already on that page, just scroll!

However, if you did for some reason want them, you would have to make some edits.

First, you can see how the modular.html.twig page overrides the header_navigation block to add the on-page navigation: https://github.com/getgrav/grav-theme-antimatter/blob/develop/templates/modular.html.twig#L29-L48

You would have to put a block definition around the area where the slidebar nav is: https://github.com/getgrav/grav-theme-antimatter/blob/develop/templates/partials/base.html.twig#L81

And then override this too.

@rhukster rhukster closed this Feb 8, 2016

@rhukster rhukster added the invalid label Feb 8, 2016

@schml

This comment has been minimized.

Copy link
Author

schml commented Mar 4, 2016

Hi rhukster,

thanks for your answer and sorry for late reply. I see the usage when it comes to usability an seo.

seo:
For mobile search crawlers, a menu is always a verry good idea to help the crawlers divide the sections on the website, especially on onepagers. Also in search engine resultpages, for example:
if someone is searching for "mywebsite contact" in google.com, if there is a menu, google will list http://www.example.com#contact in the results. Thats verry importand for relevance and ranking!

Also for usability. Why should a user get a navigation on the desktop version and when he returns on a mobile device there is none? Thats confusing.

regards, Christian

@flaviocopes

This comment has been minimized.

Copy link
Contributor

flaviocopes commented Mar 4, 2016

That's the implementation of the menu in the Antimatter theme and other themes that follow the same way of doing things. I don't think modular pages sections should go in the menu by default, but everyone has its own needs and you can tweak Grav to do what you want.

Themes in Grav have much more power than themes for other CMS, and you can customize any aspect of the site presentation by customizing the theme http://learn.getgrav.org/themes/customization#theme-inheritance.

In your case, this file provides the menu: https://github.com/getgrav/grav-theme-antimatter/blob/develop/templates/partials/navigation.html.twig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment