Menu Autopilot
Menu Autopilot is for Drupal editors and site builders who want human-curated navigation at the top and content-driven navigation underneath. Wilkes & Liberty maintains the GPL-licensed Drupal module for Drupal 10.6+ and 11. It creates ordinary menu_link_content children from published nodes, so Twig themes, JSON:API, GraphQL Compose, and headless frontends all consume the same menu tree.
Why it exists
Drupal menus are intentionally editorial. That is useful for a small set of primary destinations, but expensive when a section contains dozens of products, resources, offices, or topics that already exist as structured content. Editors end up publishing a node and then recreating it as a menu link, maintaining titles in two places, correcting aliases, and removing stale links after unpublish.
Modules that generate menus from taxonomy terms solve a different problem. Menu Autopilot keeps a curated parent and derives its children from content nodes. It is to navigation what Pathauto is to aliases: policy determines the shape, and content lifecycle keeps the result current.
Who should use it, and when
- Editorial teams whose section navigation should follow published content without a second manual step.
- Site builders designing hybrid menus where only selected branches are automatic.
- Headless frontend teams that need canonical, language-aware menu links through the same API as hand-curated links.
- Multisite and distribution maintainers who want navigation behavior to travel as configuration rather than as undocumented editor practice.
Use it when the membership of a menu branch can be expressed as a taxonomy reference, a content bundle, or an ordered list of nodes. Keep a branch manual when every placement is a separate editorial judgment or when the order has no stable rule.
Where it runs in Drupal
Menu Autopilot extends the menu-link edit form with an “Automatic children” configuration. The selected parent remains an ordinary menu link. The module owns only the generated children beneath that parent and stores them as normal menu_link_content entities using canonical entity:node/<id> URIs. Drupal resolves those references to the current alias at render time.
Because the result is a real menu tree rather than a virtual API, every consumer sees the same links. Cache tags invalidate the affected navigation when source content changes; language-aware storage supports translated menus and aliases.
Three source strategies
- Taxonomy term: include published nodes whose configured reference field points to the selected term.
- Content bundle: include published nodes of one selected content type.
- Manual node list: select and order a controlled set of nodes while letting Autopilot maintain titles and canonical links.
An optional token pattern can supply a navigation-specific label such as [node:field_nav_title] without changing the node title.
What happens during the content lifecycle
- An editor configures one menu parent and chooses a source.
- The reconciler calculates the published nodes that belong under that parent.
- It creates missing managed links, updates titles and weights, and removes managed links that no longer qualify.
- It leaves hand-placed children untouched.
- Publishing, unpublishing, reclassification, title changes, and alias changes flow through the same idempotent reconciliation.
Idempotence is important: running the rebuild repeatedly converges on the same tree instead of deleting and recreating links, which preserves stable entity identity and avoids unnecessary cache churn.
Accessibility and multilingual ownership
The module governs menu data, not the frontend interaction pattern. Its documentation recommends the WAI disclosure-navigation pattern for site navigation rather than presenting ordinary links as an application menubar. The consuming theme or application still owns keyboard behavior, focus, expanded state, current-page indication, and WCAG testing.
Translations are stored per menu-link translation and selected by the request language. Frontend caches must vary or tag responses by language; the internationalization guide documents the expected behavior and current scope.
Install and operate
composer require drupal/menu_autopilot
drush en menu_autopilot
# Reconcile all configured automatic branches.
drush menu-autopilot:rebuild
# Convert legacy editorial-route links to canonical entity URIs.
drush menu-autopilot:normalize-uris
Core Node and Menu Link Content are required. Taxonomy is needed only for the taxonomy-source strategy. Token is optional and adds the token browser and expanded label patterns.
Honest boundaries
Menu Autopilot does not design a navigation hierarchy, choose which pages deserve promotion, or render an accessible menu component. It does not manage links outside the configured automatic branches, and it intentionally leaves manually placed children alone. Very large source sets still require sensible query, cache, and frontend-navigation design; automatically adding hundreds of children does not make that experience usable.
The module follows publication and configured source membership. If a site's inclusion rule depends on a custom business decision that cannot be expressed by the shipped strategies, implement a deliberate extension rather than encoding the rule in titles or weights.
Project, source, issues, and design guidance
- Menu Autopilot project page and releases on Drupal.org
- Source code and documentation on GitHub
- Issue queue on GitHub
- Accessibility guidance and reference interaction model
- Internationalization and cache guidance
- Whitepaper: Composing Navigation in a Headless CMS
Maintained by Jeremy Michael Cerda and Wilkes & Liberty under GPL-2.0-or-later. The checked source release for this page is 1.0.2.