Problem/Motivation
The MenuLinkContent entity has a 'enabled' base field, that decides if the menu link should be enabled or not. Currently, this is hard coded to be enabled if the menu link is created, and then you will need to use the Menu UI to change whet ever the menu link should be enabled or not.
With contrib/custom code I would like to enable that flag as a exposed field in the integration with the node form, allowing the end user to decide if that menu link should be enabled or not.
This is not possible today without having to override both menu_ui_form_node_form_submit and _menu_ui_node_save.
Proposed resolution
- Add the field as a value form field, allowing contrib/custom to override that form field i.e. to a checkbox.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3097294-12.patch | 3.87 KB | ranjith_kumar_k_u |
| #8 | node-menu-link-enabled-5.patch | 3.91 KB | daniellundahl |
| #4 | interdiff_2-3.txt | 1.45 KB | johnwebdev |
| #3 | node-menu-link-enabled-3.patch | 3.91 KB | johnwebdev |
| #2 | node-menu-link-enabled-2.patch | 2.08 KB | johnwebdev |
Issue fork drupal-3097294
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
johnwebdev commentedFirst patch:
Comment #3
johnwebdev commentedSecond patch. This also updates the constraint of MenuSettingsConstraint. This might be redundant, and could instead be the responsibility for the contrib/custom to ensure it does not behave incorrectly with pending revisions.
Comment #4
johnwebdev commentedInterdiff for 2..3.
Comment #8
daniellundahl commentedRerolled to work with 9.1.x
Comment #9
daniellundahl commentedComment #12
ranjith_kumar_k_u commentedRe-rolled for 9.4
Comment #18
smustgrave commentedTriaging my queue of menu_ui
This appears to be a feature request vs task. Think once we get an MR and summary update with screenshots we should ask UX team for feedback.
Comment #19
johnwebdev commentedIt's been 6 years, but if i remember correctly there is no UI changes here, we simply expose enabled as a hidden value by default, which allows contrib modules to change it to something like a checkbox.