Problem/Motivation
The majority of the Administration menu (/admin/structure/menu/manage/admin) is displayed via the admin
NavigationBlock plugin. There are two parts of the Administration menu that we put elsewhere, the Help menu item and the Content (and all of it's children) menu item.
The problem is the method by which we hide the Help link and Content menu items when displaying the Adminstration menu. We currently use hook_menu_links_discovered_alter
to remove Help and Content menu links from the Administration menu. Using hook_menu_links_discovered_alter
means that the Administration menu is altered everywhere the Administration menu is used instead of just the place we need it altered within the Navigation bar. For instance, when you go into the Admin UI for the Adminstration menu (/admin/structure/menu/manage/admin), those Help and Content links are gone. This could be very unexpected for other modules using the Administration menu.
Steps to reproduce
- Browse to the Adminstration menu UI (/admin/structure/menu/manage/admin)
- Take note of the Help and Content (and child) menu items
- Enable the Navigation module
- Browse to the Adminstration menu UI (/admin/structure/menu/manage/admin)
Expected result
- Help and Content (and child) menu items display in admin UI
- Help and Content (and child) menu items do not show in the
admin
NavigationBlock
plugin instance in the Navigation bar
Actual result
- Help and Content (and child) menu items DO NOT display in admin UI
- Help and Content (and child) menu items do not show in the
admin
NavigationBlock
plugin instance in the Navigation bar
Proposed resolution
Take cues from toolbar module for how it achieves the alterations to the Admin menu in order to shuffle parts of it around its UX. Namely avoid using hook_menu_links_discovered_alter
and instead alter it on output as part of the admin
NavigationBlock
plugin.
Remaining tasks
Backend implementation.
User interface changes
None.
API changes
None.
Data model changes
None.