When adding a new menu link, restrict the available parents to the current menu

Created on 31 January 2020, almost 5 years ago
Updated 11 July 2024, 4 months ago

Problem/Motivation

When adding a menu link through the Menu UI, the form present a field 'Parent link' in order to create a hierarchical menu structure. However, these options are not limited to the current menu but show all menus available in the database.

For sites using multiple menus, this list quickly becomes unwieldy.
For sites using a lot of menus, this list can create a performance bottleneck because of the large number of menu items being loaded.

Proposed resolution

Limit menu link 'Parent link' to the current menu, only when creating new menu items - menu items are always created after choosing a menu anyway.

The edit form remains unchanged so you can move a menu link from one menu to another.

Remaining tasks

Update the test coverage.

User interface changes

The menu link 'Parent link' field is limited to the current menu on the menu link add form.

API changes

None.

Data model changes

None.

๐Ÿ› Bug report
Status

Fixed

Version

10.2 โœจ

Component
Menu UIย  โ†’

Last updated 7 days ago

No maintainer
Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands idebr

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024