Problem/Motivation
The top level admin sections result in a disjointed experience for people with primarily content creation/management focused permissions. Access to items that for these users are similar tools is spread out across multiple admin sections.
From #3203618: New “content creation” menu proposal.
All the Usability tests we've run so far confirmed the usefulness of #3203618: New “content creation” menu proposal. This issue is to create this "menu", independently of how #3397058: Convert navigation sections to blocks and use the menu system evolves.
Proposed resolution
Right now the content shown in the existing Navigation comes from web/modules/navigation/src/Plugin/Navigation/NavigationContent.php.
For the first iteration of this menu let's replace the hard-coded menu with an MVP functionality as a regular menu. To not have a regression with the current code, the elements below the "Create" item should be dynamic based on the content types the site has and list all of them.
Future iterations of this will probably include a simpler way to customize this menu for Site builders than the menu UI. For now, the items under the Create section will be able to be customized through the Menu UI.
Menu name: Content management.
The menu structure will be:
- Create
- Article (based on the Content types available*)
- Basic Page (based on the Content types available*)
- Image (If Media is enabled)
- Document (If Media is enabled)
- User
- Content
- Blocks
- Files
- Media (If Media is enabled)
Remaining tasks
User interface changes
API changes
Data model changes

| Comment | File | Size | Author |
|---|---|---|---|
| #18 | Edit-menu-link-Article.png | 126.84 KB | prashant.c |
| #11 | content-menu.png | 80.59 KB | prashant.c |
| #10 | Monosnap Edit menu Content | Drush Site-Install 2023-12-15 20-54-26.png | 141.65 KB | m4olivei |
Issue fork navigation-3408298
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
ckrinaWe just discussed this with @Prashant.c and @AkshayAdhav. Since it's feasible to create the links dynamic the way they are right now, I'm changing the issue summary to add this as a requirement so this way there aren't regressions compared with the current one.
Comment #5
prashant.cComment #6
prashant.cTook the reference from https://git.drupalcode.org/project/navigation/-/merge_requests/118 created by @deviantintegral.
Trying to integrate the implementation of "Create" menu items using the menu items provided by the newly added menu "Content" through a custom block
NavigationMenuBlock.Comment #8
m4oliveiI've paired back the open MR to only include the creation of the Content menu. I've also added in a link for the Blocks page (/admin/content/block).
I don't see a way for me to mark the MR as ready, so it's still showing as Draft. Maybe @Prashant.c has to do that.
This is ready to review. In summary, it just pulls the relevant code out from @deviantintegral's work in #3397058: Convert navigation sections to blocks and use the menu system, strictly to create the content menu. To test:
Comment #9
ckrinaThanks @m4olivei!
One of the things we changed over the last weeks (since Andrew worked on his initial MR in the other issue) is that we don't want to add the option to add terms there because it easily escalate to more than 6-7 items that would be the usable limit. So I would entirely remove the code that adds the links for taxonomies.
Another thing that differs from the proposed list of links on the issue summary is listing all the Media bundles. Ideally, only Image and Document would be listed there. But that could be moved to a follow-up if it helps close this issue easier!
Comment #10
m4oliveiThanks for the clarification @ckrina. I've made those adjustments. Here's what the Content menu looks like now with Umami:
Comment #11
prashant.c@m4olivei Thanks for you efforts.
While testing this i found the following issues:
admin/content/blockis present in the "Content" menu in the backend/admin/structure/menu/manage/contentbut not appearing on the Navigation sidebar menu.Thanks
Comment #12
prashant.cThere are following issues which needs to be adderessed as well.
Changes not reflecting in the frontend after making any changes in the "Content" menu items:
@ckrina whether all these issues needs to be addressed in this issue itself or is this issue is dedicated only to create a menu in the backend which is "Content" menu? Please clarify.
Thanks
Comment #13
ckrinaIt is OK to not place this menu on the left sidebar yet. Since the way to place the menu will depend on how #3397058: Convert navigation sections to blocks and use the menu system is solved, this can be focused on creating the menu itself only.
About the Blocks 1st level item, I added it on the requirements in purpose. It wasn't implemented on the prototype but we got the feedback that it was confusing since it shows on the Tabs anyway. So for now it needs to go there until we do A/B testing for the final decision.
I've also noticed menu items can't be accessed and edited, and they should.
Thanks both for the work!
Comment #14
m4olivei@Prashant.c thanks for the review!
As @ckrina pointed out, and @deviantintegral pointed out in #3397058: Convert navigation sections to blocks and use the menu system, we're using this issue now for the sole purpose of creating the menu we need. It will get put into the sidebar in other issues, probably #3397058: Convert navigation sections to blocks and use the menu system.
Nice catch. There appears to be a core bug with any menu items that are provided via
hook_menu_links_discovered_alter. If I install a stock Drupal 10.2.0 instance, then simply edit the "Top search phrases" menu link in the Administration menu (/admin/structure/menu/link/dblog.search/edit), I get the same error. This menu link is provided bydblog_menu_links_discovered_alterhere: https://git.drupalcode.org/project/drupal/-/blob/10.2.0/core/modules/dbl... 😔.Quick search, I'm not seeing an issue for that. Can you confirm you're getting that same error for the "Top search phrases" link out of the box? If that's the case, that's outside our scope here, and we can carry on, maybe file a core bug if we can't find one.
Comment #15
m4oliveiOoof, this bug is even present in 9.5.x, so it's been around for awhile at least. Tested using https://simplytest.me/. Here is the instance (not sure how long it will stay up for): https://master-wxnq5cewdtr3b4i3ao2uzpzg79xhaxh6.tugboatqa.com/user (pw is admin/admin).
Comment #16
m4oliveiI found a work-around. Turns out there is an undocumented property (subject of #2729455: list of menu item properties in hook_menu_links_discovered_alter() is incomplete) that you need to return from
hook_menu_links_discovered_alterwhich isprovider. I've included that and we no longer get the error.Apologies for the noise in the commit history, I got some work mixed up. The change is good now though.
Comment #17
prashant.c@m4olivei
Great catch regarding the
provider, the error is gone but, the menu names are not editable anymore they are all changed to links only.Thanks
Comment #18
prashant.cComment #19
m4oliveiI believe that's expected behavior. It's how any menu item provided via
module_name.links.menu.ymlorhook_menu_links_discovered_alterbehaves. For example all links in the Administrative menu (/admin/structure/menu/manage/admin). As an admin, you can disable any of the links provided and add new links if you like. I imagine we might also get to a point in the future where as an admin you could disable this whole Navigation Section plugin in the navigation sidebar and swap it with something else. That's work for future tickets though.Comment #20
prashant.cAlright thanks for the clarification then I think this should be good to go.
Comment #21
m4olivei@Prashant.c would you mind marking as RTBC if you feel so inclined?
Comment #22
prashant.cLooks good to me.
Comment #23
ckrinaIt looks like this needs a local rebase to manually resolve conflict.
Comment #24
m4oliveiI've resolved the merge conflict. Should be good to go now.
Comment #25
ckrinaYass!! Thank you both for pushing this forward!