Open brylie opened 2 years ago
Totally agree. Is there any plans to add the feature of menu in Wagtail?
Not necessarily a solution to this but the docs should be updated at the next release with some clarification on what show_in_menus
does and does not do.
https://github.com/wagtail/wagtail/pull/8072
Additional to this, Wagtail usually avoids making too many decisions about what the front facing page content should look like. It may not be practical to have a core menu system that supports a spectrum of use cases.
I can see jazzband have taken over the project now so there may be some movement on the maintenance of that package https://github.com/jazzband/wagtailmenus/issues/409
Adding label needs design decision.
Additional to this, Wagtail usually avoids making too many decisions about what the front facing page content should look like. It may not be practical to have a core menu system that supports a spectrum of use cases.
Just a point for consideration: WordPress is fairly agnostic and flexible when it comes to front-end design, yet provides a user-friendly way to define custom, hierarchical navigation menus that can be integrated into front-end themes.
We have been discussing this with some of the core team and there is agreement that it would be nice, long term, for Wagtail to provide more help with managing menus. However, that does not mean that there will be a focus for this to be built any time soon.
Menu management does seem like a pretty basic feature of most content management systems, and Wagtail’s show_in_menus
makes it seem like Wagtail intends to have some support for generating menus.
Here is the suggested way forward
show_in_menus
– in particular the fact people are expected to write a fair bit of code to use it. Maybe document how to hide it for sites that don’t use it.show_in_menus
along with recommending alternatives such as wagtailmenus
.show_in_menus
no longer gets added to the default PromotePanels
by default, this could be added back in for those that use it and may work to avoid confusion for new Wagtail developers alongside new Wagtail users who see the field and expect it to do something that has not been built.This is not really an answer along the lines of 'yes this will be built' but gives some options for smaller steps towards an eventual core implementation if that makes sense in the future.
We would love any feedback on the ideas above and of course anyone that wants to contribute towards these steps is welcome to.
I think if menus are on the roadmap now, but aren't yet implemented, then hiding the 'show_in_menu' option and defaulting it to 'True' might be good enough for now.
I wonder if wagtail could take ownership of the wagtailmenus repo, like it has with wagtail-localize, because as per https://github.com/jazzband/wagtailmenus/issues/409 an a named lead maintainer has not been identified yet, even if Jazzband has nominally taken on the task.
Thanks for the feedback @janbaykara - some additional thoughts below.
show_in_menu
defaultshow_in_menus_default
https://docs.wagtail.org/en/stable/reference/pages/model_reference.html?highlight=show_in_menus_default#wagtail.models.Page.show_in_menusPromotePanels
and it becomes something developers can opt into (in queries and page editing interfaces). However, the first steps would be better documentation and examples and PRs are welcome for this.wagtailmenus
wagtailmenus
moving to jazzband front, the last update from the potential was three weeks ago. It may not be as fast as some would like but it is moving. https://github.com/jazzband/wagtailmenus/issues/409#issuecomment-1143857204the simplest way is to implement a (per site) public streamfields block for this, the following gist is an example, that can be customized and enhanced based on any use cases (even having multiple templates to be chosen by the admins) https://gist.github.com/hazho/ef9d6992893c46a3a3acf9b2667719e7
Wagtail menus has now been updated to support the latest version of Wagtail. https://github.com/jazzband/wagtailmenus/releases/tag/v3.1.4
Is your proposal related to a problem?
Navigation is a critical part of content management/architecture. However, while Wagtail provides an excellent framework for defining and managing content types, there is little support for allowing content editors to work with site navigation.
Wagtail, confusingly, has a "Show in menus" checkbox when creating pages while there is no meaningful way to define or manage the menus.
Describe the solution you'd like
I want to define and modify one or more hierarchical navigation menus through the Wagtail Admin UI. For example, a developer might define the navigation menu identifiers or template region in advance to render navigation menus in the correct place.
Describe alternatives you've considered
I've used the
wagtailmenus
plugin, which seems to no longer be maintained.Additional context
Navigation is a first-class concern with popular CMS solutions like WordPress and Drupal.