Problem/Motivation
When creating a node, you can choose to provide a menu link. It would be nice to have the option to provide a menu link when creating a node by default if desired.
Steps to reproduce
NA
Proposed resolution
I propose adding a checkbox under Menu settings when editing a Content type, which would control if a menu link is automatically provided when creating a node of that content type.
Remaining tasks
Review
User interface changes
before

after

Introduced terminology
NA
API changes
NA
Data model changes
NA
Release notes snippet
NA
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | Screenshot 2026-04-22 at 7.15.29 PM.png | 110.97 KB | smustgrave |
| #27 | Screenshot 2026-04-22 at 7.10.17 PM.png | 84.04 KB | smustgrave |
Issue fork drupal-3371646
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 #3
cilefen commentedComment #4
cilefen commentedComment #5
ranjith_kumar_k_u commentedThere was an issue with the functionality, so fixed that and added tests.
The current MR was created against 9.5x and I don't have permission to edit, so created patch
Comment #6
ranjith_kumar_k_u commentedComment #7
smustgrave commentedThis seems close but I don't see where we are testing that the menu link is pre-checked on the node add page.
Also will need a change record with appropriate screenshots.
Comment #8
ranjith_kumar_k_u commentedHi, I updated the tests, I hope this will be enough
Change record - https://www.drupal.org/node/3373587
Comment #10
smustgrave commentedThink this is better
Comment #11
lauriiiGiven the schema change, wouldn't this need an upgrade path?
Comment #12
smustgrave commentedClosed #1440694: Add a menu item for each "Basic page" by default (Standard install profile) as a duplicate
Comment #13
yoroy commentedExcellent idea, lets do this. Two questions:
- Provide or create? Maybe create is the simpler word? Lets also add 'a': Create a new menu item by default.
- Was this deliberately put at the bottom of this list of settings? I can also imagine it at the top, as the very first consideration and decision to make for this menu settings section.
Comment #14
chris matthews commented"Provide" is the word used in the Menu settings on the node edit form, so it might be best to keep the words consistent.
"Provide a menu link by default."
-OR-
"Provide a menu link by default when saving new content."
-OR-
"Provide a menu link by default when saving new content of this type." - My vote, fwiw
The "...content of this type" phrase comes from two other places:
"Content of this type can be placed in the selected menus."
"This text will be displayed at the top of the page when creating or editing content of this type."
The word "Add" would also make sense as it is used throughout the UI, but between the 3 proposed options (Provide, Create, Add) I'd personally vote for consistency and stick with "Provide", unless we want to change the word "Provide" to something else on the node edit form.
Note: whichever sentence ends up being used it needs a . (period) at the end of the sentence.
I think it make most sense either right above or right below the Default parent link select list as the two are related.
Comment #15
kunal.sachdev commentedComment #17
kunal.sachdev commentedComment #18
omkar.podey commentedThe MR looks good overall but I think the testing could be easily extended to check if the link was actually created at
admin/structure/menu/manage/mainComment #19
kunal.sachdev commentedComment #20
smustgrave commentedSeems additional test coverage has been added in commit https://git.drupalcode.org/project/drupal/-/merge_requests/4642/diffs?co...
Comment #21
alexpottSee the comment on the MR - we need to rewrite the post update.
Comment #22
alexpottHiding all the files to make this easier to review.
Comment #24
niklp commented+1 for putting it at the top.
I get what Chris Matthews is saying but in natural order I would say something like: "Oh definitely create a menu item by default, these are the menus I would like available, but the default one should be this." That feels right to me.
Comment #26
smustgrave commentedClosed #3405645: Auto create the menu for node. as a duplicate of this.
Triaging this one
First this needs an issue summary update.
Let me try and get a main branch up for review.
Comment #27
smustgrave commentedComment #28
smustgrave commentedComment #30
smustgrave commentedBelieve this is ready for review.
Comment #31
dcam commentedI had one question on the MR. The rest looks good to me. I manually tested the new setting as thoroughly as I could and it works correctly.
Comment #33
dcam commentedMy feedback was addressed. Thank you for considering it.
Comment #34
quietone commentedI read the CR, which I found somewhat confusing. I started to improve the text and grammar as best I could. I then tested the MR locally and the images in the change record are out of date. The text for the new setting has changed since they were made.
I also don't see that the text hasn't been checked by the usability team. What strike me is the use of 'by default'. This page is exactly for setting various defaults to use. Of all the settings available on the article content type edit page the only use using default is the 'default parent link'. So why is it being added here. I did see that @yoroy suggested it 3 years ago, and at the same time he questioned whether it should be 'create' or 'provide'. There was only one other comment about the wording.
And why not follow the existing pattern. "Promoted to front page" and "Sticky at top of lists" are the same on the content type edit page and the create page. Why can't this just be "Provide a menu link"? To me, it has the same meaning.
Comment #35
benjifisherWe discussed this issue at #3591402: Drupal Usability Meeting 2026-05-29. That issue will have a link to a recording of the meeting.
The attendees at the usability meeting were @kentr, @rkoller, and @the_g_bomb. I am giving them credit on this issue.
Comment #36
smustgrave commentedFwiw I’m fine with “Provide Menu link” as suggested by quietone
Comment #37
rkollerUsability review
We discussed this issue for the first time at #3591402: Drupal Usability Meeting 2026-05-29. The link to the recording: https://www.youtube.com/watch?v=z8_i1aGRIZE. The attendees at the usability meeting were @kentr, @rkoller, and @the_g_bomb. We discussed the issue for a second time at #3592713: Drupal Usability Meeting 2026-06-05. The link to the recording: https://www.youtube.com/watch?v=-WfaMFyc6bc. The attendees at the second meeting were @benjifisher, @rkoller, and @worldlinemine.
Initially, the base behavior introduced by MR15538 looked like a convenient and useful addition, but on closer look it turned out it introduces a few significant problems, mainly in the context of how things are being communicated, or rather how they are not communicated, which leads to a lack of situational awareness. Below, the points that caught our attention, at first node edit forms:
Provide a menu link by default when saving new content of this type.setting enabled, compared to nodes for content types that have that setting disabled. When loading the node edit form page theMenu settingsdetails element in the advanced sidebar has an empty summary. A few different perspectives:Menu settingsdetails element by chance when they are entering content into theTitlefield in the node edit form. The animation they notice is when the entered title gets synced and added into theMenu link titlefield within theMenu settingsdetails element, and thatMenu link titlealso gets displayed and updated as the the detail element's summary.Provide a menu linksetting is enabled for the node at hand could go entirely unnoticed.Menu settingsdetail element could go completely unnoticed beneath the fold - the user might fill out the node edit form and just submit it.Provide a menu linksetting enabled. There is also no announcement in the aural interface when the detail summary andMenu link titlefield are shown or getting updated.For a site with, for example, 50 different content types, 14 have the
Provide a menu link by default when saving new content of this type.setting enabled while the other 36 have the setting disabled. That leads to a high cognitive load because it is not communicated in a clear, unambiguous, and explicit manner if the setting is being enabled for a node of a particular content type. In consequence, a user has to either memorize which of the content types have the setting enabled, but for people with a small working memory or lacking explicit declarative memory, that becomes a challenging endeavor; the other option people have is to get into the advanced sidebar for reassurance. And when a user is unaware that they are on a node that has theProvide a menu link by default when saving new content of this type.setting enabled, they might end up with menu item labels that are way too long unknowingly because they thought they were writing a title for, for example a blog post, not a title that would also be used as a menu item label - the two have different requirements in regard to character length.Titlefield in the node edit form to theMenu link titlefield in the advanced sidebar. An implicit undocumented behavior that is already part of core, and the outcome for every scenario is not necessarily clear, including fringe edge cases:Provide a menu linkcheckbox checked, content entered into theTitlefield is getting synced directly to theMenu link titlefield.Menu link titlefield, the sync process is getting terminated, and the content of theMenu link titlefield becomes independent from the content of theTitlefield.Provide a menu linkcheckbox is now getting unchecked and then rechecked again, the content is getting lost - in the case of the bespoke content in theMenu link titlefield, that is actual data loss. After rechecking theProvide a menu linkcheckbox, the current content of theTitlefield is getting synced again with theMenu link titlefield until the node edit form is getting submitted.Provide a menu linkcheckbox is then getting checked, and content is getting entered into theMenu link titlefield; theTitlefield remains empty - the synchronization is a one-way street from theTitleto theMenu link titlefield.Provide a menu linkcheckbox checked is getting altered, those changes are not getting synced to theMenu link titlefield anymore.Provide a menu linkcheckbox, change the title, and recheck the checkbox, the sync with theMenu link titlefield is reenabled until the next submission/save of the node.Due to the fact that this helper function is not defined nor explicitly stated how it is supposed to work in every aforementioned scenario, it might create false expectations on the user's end.
Provide a menu linkcheckbox enabled by default and those having it disabled, theMenu settingsdetail element on the node edit form is the sole cue to help with a distinction - but the problem is that attribute is only communicated indirectly. For nodes of content types with theProvide a menu linksetting disabled, the summary readsNot in menu, while for nodes of content types with the setting enabled, first you have no summary, and as soon as a title is being added, it is getting synced to theMenu link titlefield, and the summary for theMenu settingsdetail element is getting updated accordingly. So at this point, with the setting enabled, only the currentMenu link titleis shown. In contrast, on other detail elements in the advanced sidebar, more or less all the available information about particular settings is being displayed in the summaries. For example, the summary forPromotion optionsthe detail element displays the exact labels of the checked checkboxes. Only theMenu settingsdetail element is solely the content of theMenu link titlefield being displayed in the summary; neither the label of theProvide a menu linkcheckbox nor the description or the chosen parent link is being displayed. A lot of context is being omitted in this particular case.The menu settings for a content type have similar problems:
Submission form settingsvertical tab is active/selected on theEditlocal task for a content type. All vertical tabs except the one toMenu settingsprovide a summary of the active settings. So one additional click is necessary to get into the vertical tabMenu settingsand be able to determine if the content type provides a menu link by default or not. The summary also doesn't provide any information about the chosen menus and the selected default parent link. At the moment the summary for theMenu settingsvertical tab does not provide any situational awareness at all.Provide a menu link by default when saving new content of this type.for the checkbox added by MR15538 within theMenu settingsvertical tab is quite lengthy and hard to process. We have compared the settings available within the vertical tabs on a content type with the settings available within the advanced sidebar on a node edit form - usually the labels for checkboxes on vertical tabs and the advanced sidebar are identical. Aside from the microcopy, the position differs as well; on the advanced sidebar, theProvide a menu linkcheckbox is on top of theMenu settingsdetail element, while in the vertical tab it is at the very end. Aside from those inconsistencies, having a checkbox with a lengthy and hard-to-process label at the bottom right at the end of the form of a vertical tab could lead to it being overlooked and/or omitted from thorough scanning/processing.We've decided against trying to make any recommendations at this point yet and agreed on revisiting this issue for hopefully one last time in one of the next meetings. We just wanted to document the outcome of the initial two discussions for now.
If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.
Comment #38
benjifisherI was at the second Usability meeting mentioned in Comment #37. We were well into that meeting before we realized that a lot of the surprises (like when un-checking and re-checking the "Provide a menu link" option) are existing behavior. It would have been helpful if someone who has worked on this issue had been able to attend the meeting.
One of the main points in Comment #37 is that there should be a clear indication that the Title field is being copied to the "Menu link title" field. This is an existing problem; the difference is that, before this issue, the content editor has to enable the checkbox before the text is copied. It may not be hard to fix this problem. One idea is to add some help text under the Title field when the "Provide a menu link" option is selected.