Canvas Page menu ui

This project is not covered by Drupal’s security advisory policy.

Adds the "Provide a menu link" option and a non-enforcing Pathauto alias suggestion to Canvas's Page entity — filling two gaps that Canvas leaves open by design: its Page entity isn't a node (so core's Menu UI can't touch it), and Canvas disables Pathauto to keep URL aliases under manual control.

Features

Canvas's Page entity is a standalone content entity, not a node, so core's menu_ui module can't offer a "Provide a menu
link" option on it — and Canvas deliberately disables Pathauto on every save to keep the Page's URL alias manually controlled. This module bridges both gaps without fighting Canvas's design:

  • Menu settings field — a field on the Page entity equivalent to node's "Menu settings" fieldset: editors can provide a menu link and set its title, description, parent, and weight, right from the Canvas editing experience.
  • Menu-aware tokens — exposes [canvas_page:menu-link:*] tokens (via the Token module's menu-link token type), so Pathauto patterns can build aliases from a page's position in the menu, e.g. /[canvas_page:menu-link:parents:join-path]/[canvas_page:title].
  • Non-enforcing Pathauto suggestion — when a configured pattern uses those menu tokens and the alias field is empty, the module pre-fills a suggestion the editor can accept, edit, or clear. Pathauto is never allowed to generate or overwrite an alias on its own, and an existing alias is never touched — Canvas's forced manual control of the Page's URL alias stays intact.
  • Real field storage, not a transient form value — the menu link is stored in an actual field (menu_settings), so Canvas's editor (which detects unsaved changes by hashing the entity's field values) correctly notices when it changes.
  • Non-destructive sync — the underlying menu_link_content entity is kept in sync with the field on insert, update, and delete, but a save that doesn't change menu_settings never touches the menu link — so changes made directly in the menu admin UI (like reordering) are preserved.

Use this module whenever you're using Canvas and need Pages to appear in site navigation menus and/or want their URL aliases to reflect their place in that menu — both things editors get for free with nodes but not with Canvas Pages out of the box.

Post-Installation

  1. Create a Pathauto pattern for the Canvas Page entity type at /admin/config/search/path/patterns, built from [canvas_page:menu-link:*] tokens (e.g. /[canvas_page:menu-link:parents:join-path]/[canvas_page:title]).
  2. Visit Configuration > Content > Canvas Page menu settings (/admin/config/content/canvas-page-menu) to choose which menus are offered in the "Parent link" dropdown. Defaults to main. Requires the Administer Canvas Page menu settings permission.
  3. Edit a Canvas Page. Under Menu settings, check "Provide a menu link" to place it in a menu.
  4. If the alias field is empty and a matching pattern is configured, it's pre-filled with a suggestion computed from that pattern — accept, edit, or clear it before saving.

No content type or extra admin screen beyond the settings form above is needed; everything else surfaces directly on the Canvas Page edit form.

Additional Requirements

Beyond Drupal core, this module requires:

Similar projects

Supporting organizations: 

Project information

Releases