Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

menu_hide_parent

No security coverage Maintenance fixes only 4 sites

This module automatically hides parent menu items that lead to no accessible child links for the current user. This keeps navigation menus clean by preventing placeholder items like "Create" or "Settings" from appearing if the user lacks permissions for any sub-items.

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.

Ask your assistant about menu_hide_parent

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Apr 2026
Latest release
4 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.1.0-alpha3 Pre-release 10–11 May 20, 2026
1.1.0-alpha2 Pre-release 10–11 Apr 20, 2026
1.1.0-alpha1 Pre-release 10–11 Apr 20, 2026