Canvas Page Metatag
This module restores the full Metatag editing experience for Drupal Canvas pages, allowing you to configure Basic, Advanced, Open Graph, Facebook, and Twitter Card tags. It also fixes a compatibility bug between Drupal Canvas and the Metatag Robots field.
Introduction
Canvas Page Metatag is a Drupal 11 module that gives Drupal Canvas
pages the same full Metatag editing experience that ordinary
fieldable entities (nodes, taxonomy terms, and so on) already have. Canvas's own page edit form hides almost every
Metatag field down to a single SEO title — this module re-exposes Basic tags, Advanced, Open Graph, Facebook,
and Twitter Cards, each independently toggleable.
No AI is involved. This is a Form API integration module, not a content-generation feature.
Project Summary
Expose the full Metatag tag groups — Basic tags, Advanced, Open Graph, Facebook, and Twitter Cards — on
Drupal Canvas pages, and fix a real Canvas/Metatag Robots-field submission bug along the way.
Features
- Re-exposes Metatag's Basic tags (description, abstract, keywords), Advanced (Robots, referrer, etc.), Open Graph, Facebook, and Twitter Cards groups on the
canvas_pageentity edit form. - Each tag group is independently toggleable from a settings page — nothing is hardcoded on or off.
- Declares Metatag, Metatag: Open Graph, Metatag: Facebook, and Metatag: Twitter Cards as dependencies, so enabling this module installs everything it needs automatically.
- No custom rendering code: because Canvas pages are normal routed, fieldable content entities, Metatag's own mechanisms already render the configured tags into the page
<head>once the required submodules are present. - Fixes a genuine compatibility bug between Canvas's React-based builder UI and Metatag's Robots checkboxes field (see below).
Post-Installation
After installing the module:
- Its dependencies (Metatag, and the Open Graph/Facebook/Twitter Cards submodules) are installed automatically.
-
Go to Configuration → Search and metadata → Canvas Page Metatag
(/admin/config/search/canvas-page-metatag). - Toggle which tag groups should appear on the Canvas page edit form: Basic tags, Advanced, Open Graph, Facebook, Twitter Cards. All five are enabled by default.
- Open any Canvas page in the builder and edit its metatags — the enabled groups now appear as their own collapsible sections alongside Canvas's existing SEO title field.
-
Site-wide or per-bundle defaults for these tags can still be set the normal Metatag way, at
Configuration → Search and metadata → Metatag — Canvas pages appear there like any other fieldable entity type.
Additional Requirements
- Drupal 11
- Drupal Canvas
- Metatag, with the Open Graph, Facebook, and Twitter Cards submodules
Similar projects
Metatag already supports any fieldable entity type generically. Canvas Page Metatag doesn't duplicate that —
it specifically restores the parts of the Metatag editing experience that Drupal Canvas's own page edit form hides, and fixes a Canvas-specific form submission bug in Metatag's Robots field. It is not a general-purpose Metatag replacement or an AI content generator.
Supporting this Module
Bug reports, feature requests, patches, and documentation improvements are welcome through the Drupal.org issue queue.
Community Documentation
Documentation is available in the project repository's README.md
Permissions
This module does not define any custom permissions. The settings form is gated by Drupal core's
Administer site configuration permission; editing a Canvas page's metatag values is governed by that page's own normal edit permission.
Architecture
- CanvasPageMetatagFormHooks – Implements
hook_form_canvas_page_form_alter(). Restores#accesson the tag groups/fields Canvas hides, per this module's settings, and attaches the Robots checkboxes repair callback. - SettingsForm – The settings page toggling which tag groups are exposed, backed by
canvas_page_metatag.settingsconfig.
The module is fully compatible with Drupal 11 and Drupal Canvas 1.8+.