Understanding Drupal Canvas

Drupal Canvas is an exciting new tool for visual editing in Drupal. It is a ground-up reimagining of how content editing and site templating is performed, and is an integral part of Drupal CMS.

A confusing aspect of Canvas is how it is described in documentation and marketing materials as either a site builder's tool or as a content creator's tool. Is it both? Neither?

The answer—at least insofar as what is "ready for prime time"—is "both, but not for everything."

For site builders

The primary application of Canvas for site building is the creation of "content templates." These are bits of site configuration (they'll get synced out to YAML files) which handle the structure of nodes when they are rendered.

When a content type is built with Canvas, this replaces the normal "Manage Display" interface. Instead of rearranging a linear list of predefined node fields, you will use the visual editor to drag-and-drop components and manage the whole structure of the rendered entity.

For an agency like ours, using the Manage Display interface isn't really a bother, and we are used to creating Twig files and configuring field groups to fine-tune the HTML rendered for a node. But a big win here is in separation of concerns: the activity of creating the display and working on CSS presentation can all happen with placeholder content before the content type's fields are even defined! Then a back-end architect can link the placeholders to real data sources once they are ready to go, allowing more work to happen in parallel and speeding up project timelines.

For content creators

Editing content in Drupal has gone through a bunch of major shifts. First we had giant Body fields supporting a restricted set of manually-typed markup. Then we added structured content (Flexinode, which became CCK, which became Fields). This got enhanced by better WYSIWYG integrations with CKEditor for individual fields. Then Paragraphs came along, letting us pre-package page components for more editing flexibility within brand guidelines. And these days Layout Paragraphs offers a much better experience for seeing how these components are laid out on the page.

The Canvas UI leaves all these in the dust. Components are truly drag-and-drop, and can run the gamut from static text to embedded views. The interface is snappy and intuitive.

Understanding the storage of this information is crucial to getting to grips with its capabilities and limitations. Pieces of content managed with Canvas are called "Pages" and they are exactly that: 1-to-1 relationships between content and a URL. They are not nodes, but rather a completely different entity type. They have authors, revisions, and all the other standard features you'd expect from a node, but are not fieldable and don't have multiple displays.

What we can't do (yet)

Because Canvas is all about editing a page, not a chunk of content, we can't use its UI within the context of a structured item. Something like a blog post is a bad fit for Canvas, because while we could make the page and present it beautifully, we wouldn't be able to give it taxonomy references, render a teaser, generate lists in Views, or any of the goodies we expect Drupal to give us.

Until that time comes, Canvas for content creators will be best suited for one-off landing pages, marketing pages, and home pages. Hopefully we'll be able to employ it in more situations soon; we're watching those issue queues closely!

Need a fresh perspective on a tough project?

Let's talk about how RDG can help.

Contact Us
Front-end Development
User Experience
Drupal