Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

Menu Hide Parent automatically hides placeholder parent menu items (such as those using or routes) when they have no visible child links after access checks.

This ensures that top-level items like Create, Manager, or Settings do not appear in navigation menus when users don’t have permission to access any of their sub-items — keeping menus clean, contextual, and role-aware.

Features

  • Automatically hides parent menu items using or targets when they have no accessible children.
  • Respects role-based and permission-based access controls.
  • Cache-safe, runs only on menu tree rebuilds, not every page load.
  • Per-menu enable/disable configuration via the admin UI.

Configuration

  • Go to Configuration → User Interface → Menu Hide Parent (/admin/config/user-interface/menu-hide-parent).
  • Check the menus where you want to hide empty placeholder parent items.
  • Save configuration.
  • (Optional) Grant the Administer Menu Hide Parent settings permission to trusted site builders.

Use Cases

  • Hiding “Create” or “Manager” menu headers when users can’t create or manage any content types.
  • Preventing empty parent items from cluttering navigation for restricted roles.

Technical Notes

  • Implements hook_menu_tree_alter() to prune menu trees at render build time.
  • Adds user.roles as a cache context for per-role variants.
  • Fully compatible with cached menu rendering and configuration-managed menus.

Activity

Total releases
3
First release
Apr 2026
Latest release
2 weeks ago
Release cadence
15 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.1.0-alpha3 Pre-release May 20, 2026
1.1.0-alpha2 Pre-release Apr 20, 2026
1.1.0-alpha1 Pre-release Apr 20, 2026