Drupal is a registered trademark of Dries Buytaert
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)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! video_embed_field 3.1.0 Minor update available for module video_embed_field (3.1.0). bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). commerce 3.3.5 Minor update available for module commerce (3.3.5). geocoder 8.x-4.34 Minor update available for module geocoder (8.x-4.34). leaflet 10.4.5 Minor update available for module leaflet (10.4.5). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3).

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
2
First release
Apr 2026
Latest release
23 hours ago
Release cadence
0 days
Stability
0% stable

Releases

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