Find "most suitable" Navigation Menu fallback based on Nav block insertion location context #56247
Labels
[Block] Navigation
Affects the Navigation Block
[Feature] Navigation Menus
Any issue relating to Navigation Menus
[Type] Enhancement
A suggestion for improvement.
Currently the Navigation block utilises a fallback mechanic to pick a "most suitable" Navigation for the user to avoid having an empty Navigaiton block when a site is first created or a Theme switch occurs.
The algorithm is currently (in order of priority):
However there is a flaw with this.
A preferable scenario would be that the system is aware of the context of where you are inserting the Navigation block and chooses the "most suitable" Navigation based on this context.
In such a system we would prepend another step to the fallback mechanic which would try to find a Navigation Menu based on the slug of the template part of the Navigation block which is requesting the fallback. If that fails to find anything matching then it immediately provides a list of Pages as the fallback.
This work may require #45512 to be completed prior to implementation as it would be better to search for "suitable" Navigation Menus by something that the user cannot modify (e.g. slug of the Navigation Menu) rather than something that could be modified (e.g. title of the Navigation Menu).
The text was updated successfully, but these errors were encountered: