localgovdrupal / localgov_menu_link_group
Present Drupal's menu links in groups.
Installs: 70 940
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 0
Open Issues: 3
Type:drupal-module
- 1.x-dev
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0-alpha1
- dev-release-1.x
- dev-feature/1.x/support-drupal-11
- dev-fix/1.x/issue-34-strict-types
- dev-fix/1.x/refactor-test
- dev-feature/1.x/shared-workflows
- dev-feature/1.x-36-menu-discvoered-implementation
- dev-fix/1.x/strict-types-coding-standards
- dev-fix/28-php-phpstan-issues
- dev-feature/25-coding-standards
- dev-feature/drupal-10
- dev-fix/15-coding-standards
- dev-feature/update-github-actions
- dev-fix/3-filter-based-on-access
- dev-feature/78-naming-conventions
- dev-feature/initial-module-code
This package is auto-updated.
Last update: 2024-12-12 12:36:18 UTC
README
What is it?
This Drupal module allows you to bundle several menu links into a group. This is useful when you want to breakdown a long list of menu links into several smaller groups for better user experience.
As an example, imagine having a long list of content types: Banana, Blackbird, Bat, Cat, Elephant, Magpie, Orange, and Watermelon. If you are using Admin Toolbar Extra Tools or a similar module, these content types will appear as a flat list of menu links under Drupal's Add content menu item. This module can help you group these menu links into severel smaller groups such as the following:
-- Add content
---- Birds
------ Blackbird
------ Magpie
---- Fruits
------ Banana
------ Orange
------ Watermelon
---- Mammals
------ Bat
------ Cat
------ Elephant
Here we have defined the Birds, Fruits, and Mammals groups and decided which menu links belong to each group.
This grouping functionality is not limited to content types only. It can be applied to any menu link.
How to use it
- Install the localgov_menu_link_group module in the usual way.
- Login as a site admin or any other user with the administer site configuration permission.
- Head to /admin/structure/menu/localgov_menu_link_group
- Add a new Menu link group.
- While adding the group, decide where in the menu tree this group should appear. Choose your selection from the Parent menu link dropdown.
- Use the Child menu links dropdown to select the menu links that should come under this new group.
- Save the Group form.
- A menu link with your choosen group label should appear in the menu tree under your choosen parent menu link. This menu link is not clickable.
- Hovering over this menu link should reveal its child menu links.
Good to know
- If you have the multiselect Drupal module installed, the Child menu links dropdown would make use of that resulting in better user experience.
- The weight value of each group can be adjusted in two ways:
- From the Group add/edit form.
- By drag-and-drop from the group listing page at /admin/structure/menu/localgov_menu_link_group
- The group configurations are fully exportable and importable like any other Drupal configuration file.
- By using the same Group label and parent menu link, multiple groups can be part of the same menu link group. This could be useful when you are providing configration files from multiple modules.
Todo
- Unit tests.
Maintainers
This project is currently maintained by:
- Finn Lewis: https://www.drupal.org/u/finn-lewis
- Stephen: https://www.drupal.org/u/stephen-cox
- Adnan: https://github.com/Adnan-cds
- Andy Broomfield: https://www.drupal.org/u/andybroomfield