Configuration
Learn how to enable and configure Canvas Override on your content types.
Enabling Canvas Override on a Content Type
Canvas Override is configured per content type. To enable it:
- Go to Structure > Content types (
/admin/structure/types). - Click Edit on the content type.
- Open the Canvas layout fieldset in the vertical tabs.
- Check Enable per-content Canvas layout editing on the full content view mode.
- Click Save.
Only users with the Administer Canvas Override permission see this fieldset.
What Happens When You Enable
When you save a content type with Canvas Override enabled, the module automatically:
- Creates a
field_canvas_layoutfield (type:component_tree) on the content type if it does not already exist. - Locks the field so it cannot be deleted through the UI.
- Configures the
fullanddefaultview displays to render the field using thecanvas_naive_render_sdc_treeformatter. - Generates a dynamic permission: "Use Canvas Override for [content type]".
No manual field creation or display configuration is needed.
Disabling Canvas Override
To disable Canvas Override on a content type:
- Uncheck the checkbox on the content type edit form.
- Save the content type.
What is preserved: Existing per-content layouts are kept in the database
but will no longer be used for rendering. The field_canvas_layout field
remains on the content type (it is locked).
What changes: Content reverts to the ContentTemplate default. The Canvas tab no longer appears for that content type.
Re-enabling: If you re-enable Canvas Override later, existing per-content layouts are restored automatically.
Programmatic Configuration
Canvas Override uses Drupal's third-party settings system. You can enable it programmatically:
$node_type = \Drupal\node\Entity\NodeType::load('article');
$node_type->setThirdPartySetting('canvas_override', 'enabled', TRUE);
$node_type->save();
The field_canvas_layout field is automatically created when a content type is
saved with Canvas Override enabled, including during config imports and recipe
installations.
Via Drush
drush php:eval "\$type = \Drupal\node\Entity\NodeType::load('article'); \$type->setThirdPartySetting('canvas_override', 'enabled', TRUE); \$type->save();"
drush cr
View Display Configuration
The field_canvas_layout field is configured on the full and default view
modes with these settings:
| Setting | Value |
|---|---|
| Formatter | canvas_naive_render_sdc_tree |
| Label | Hidden |
| Weight | -2 |
You can adjust the weight or visibility through the Manage display tab on
the content type, but the formatter should remain
canvas_naive_render_sdc_tree for correct rendering.
Multiple Content Types
You can enable Canvas Override on as many content types as needed. Each content type is configured independently:
- Enable/disable is per content type.
- Each enabled content type gets its own dynamic permission.
- Content types can have different ContentTemplate defaults.
Recommendation: Only enable Canvas Override on content types where editors actually need per-content layouts. Enabling it everywhere adds unnecessary complexity.
Configuration Checklist
Use this checklist after enabling Canvas Override on a content type:
- [ ] Canvas Override checkbox is enabled on the content type
- [ ]
field_canvas_layoutfield exists (created automatically) - [ ] View display is configured with the correct formatter (automatic)
- [ ] Appropriate permissions are assigned to roles
- [ ] Editors can see the Canvas tab on content items
- [ ] Cache is cleared (
drush cr)
Troubleshooting
Checkbox Not Visible on Content Type Form
Issue: The Canvas layout fieldset does not appear on the content type edit form.
Solutions:
- Check that you have the "Administer Canvas Override" permission
- Verify Canvas Override module is enabled: drush pm:list --filter=canvas_override
- Clear the cache: drush cr
Field Not Created
Issue: Enabling Canvas Override does not create the field_canvas_layout
field.
Solutions:
1. Check the Drupal log at Reports > Recent log messages
(/admin/reports/dblog) for errors.
2. Verify the Canvas module is installed and working.
3. Create the field manually if needed:
drush php:eval "\Drupal\canvas_override\Hook\CanvasOverrideHooks::ensureCanvasField('article');"
Settings Lost After Config Import
Issue: Canvas Override settings disappear after a configuration import.
Solutions:
- Verify the third-party settings are included in the exported
node.type.*.yml files.
- Check that the config import includes the correct content type YAML.
Next Steps
- Configure permissions for your team
- Troubleshoot issues with common problems
- Learn how editors use Canvas Override