How do we make the Volto navigation menus automatically track the organization of content items?
I assumed from the way the default navigation bar automatically tracked the top level items that it did so for nested layers, but that seems to not be the case. This is necessary for dynamically growing sites of any substantial size. It’s built into the classic Plone frontend, and a fundamental element of any site builder and content management system. But I’m failing to find it for Volto. What am I missing?
I’ve been playing with GitHub - collective/volto-dropdownmenu: Volto addon for a customizable dropdown menu. I’m able to create some nested entries. But from what I can tell it seems like maintaining a comprehensive navigation map of an elaborate site quickly becomes untenable, with changes at top levels of the content hierarchy requring potentially geometrically multiplied numbers of manual changes to menus and submenus. I have further to go to fully understand how to use it, but it’s looking like it won’t provide a sustainable means to maintain site navigation.
An elaborate site without thorough and clear navigation is useless. A dynamically growing and changing site needs automatically updated navigation! Sorry if I'm sounding alarmed, but have I failed to notice some simple way to get what Plone classic does with the navigation header by default?
Volto's default main nav menu is one level only. On some of the websites we implemented for EEA we used a dropdown-based navigation, see for example water.europa.eu/freshwater and the relevant code: volto-freshwater/Navigation.jsx at master · eea/volto-freshwater · GitHub and volto-freshwater/Header.jsx at master · eea/volto-freshwater · GitHub
Wow, @tiberiuichim, this is a major step towards what I'm seeking! If it works as I expect, I think it will enable me to go forward with Plone 6. Thanks much!
Thanks also for pointing to the specific customizations which implement the navigation menus. That will help me get a handle on what I'm using, in case I need to tweak it, or evaluate other options down the road. I really appreciate it!
(The site and its menus are quite nice! Ultimately I would like a collapsible-outline style layering, which insulates against menu crowding of very deep and populous hierarchies, but I expect that kind of thing will emerge once Plone 6 is around for a little while.)
I think one of the major current issues is trying to come up with "good defaults" for Volto, have them agreed and implemented with the rest of the community. Right now it's seems easier for everybody involved to just "do their own thing", as coordination takes a lot of time and effort. Fortunately Volto is flexible enough to accomodate this.
So the obvious path for such major improvements are packaging it as an addon, but that has pros and cons:
- addons can get neglected if the original author no longer uses it
- but addons are optional, and by not having that feature in core we make the core lighter (in terms of static resources delivered to browsers) for anyone else not using the feature.
We have also an addon that customizes the main menu to be a dropdown:
Thanks, Mikel! I'm giving it a try. Looks like the approach I want, but there are some things not working as I expect. (It may be that Volto has changed enough since the addon was developed, or I'm misunderstanding something.)