Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The current entity <-> menu link integration has a couple of pain points:
- You can just provide menu links for nodes, for other entity types you need to create menu links via the menu UI instead of on the entity itself
menu_ui
does two things: a) provides a UI for all menu links b) provides a UI to create links to nodes- The later functionality of menu_ui is one of worse examples of code in Drupal
- Node links don't support the common usecase yet to provide different menu links per language, so they can appear in different menus. This was possible tin D7 with contrib
Proposed resolution
- Move the node links bit from
menu_ui
tomenu_link_node
or a similar module: #2859273: Move the node links bit from menu_ui to menu_link_node or a similar module - Keep
menu_link_node
basically as a legacy module. - Work on writing a generic menu link field: #2315773: Create a menu link field type/widget/formatter which enables menu links for every entity type. This had always been planned as phase 3 of the menu link plan: #2256497: [meta] Menu Links - New Plan for the Homestretch
- Extend the generic menu link field with a setting to store multiple menu links, one per translation. This allows people to also configure the menu per translation.
Remaining tasks
Agr
Comments
Comment #2
dawehnerComment #3
pwolanin CreditAttribution: pwolanin as a volunteer and commented+1 for this as overall plan. We had wanted this field in 8.0.0 but lost momentum.
Comment #4
pwolanin CreditAttribution: pwolanin as a volunteer and commentedComment #5
pwolanin CreditAttribution: pwolanin as a volunteer and commentedAdding note about #2256497: [meta] Menu Links - New Plan for the Homestretch to issue summary