DrupalEasy Show & Tell: Content templates in Drupal Canvas with Ted Bowman

(Via AI) Drupal Canvas Content Templates Overview

Michael and Ted discussed the implementation and usage of content templates in Drupal Canvas, focusing on the ability to take control of the full content view mode for nodes. They clarified that content templates are currently limited to nodes and are part of a dev mode feature, which is experimental and not yet documented in the beta release notes. Michael walked through the setup process, including enabling Drupal Canvas, setting up a fresh site, and using the Neon Byte theme for components. They explored the UI for creating and managing templates, noting that users need to select a page to access the template interface and that templates require a preview entity to be visible.

Drupal Canvas Field Mapping Discussion

Ted and Michael discussed testing and mapping fields in Drupal Canvas. They explored how to map content fields to components, with Michael successfully mapping the title field to a text component. They also touched on the functionality of the SDC module and its default images. The conversation highlighted the potential for mapping various fields to props or slots in the future, though some limitations were noted.

Template Image Challenges and Solutions

Michael and Ted discussed issues with adding images to a template and explored various test modules and fields in Canvas. They encountered challenges with the media browser and image handling, leading them to consider simplifying the approach by using a select list or references instead. They decided to try adding a new field with a select list to potentially connect to other articles and expose author information.

Content Template Development Progress

Michael and Ted discussed the development of content templates, focusing on mapping fields and creating nodes. They explored how to link content, grab text from images, and use mapped fields to create relationships. Michael expressed satisfaction with the interface and functionality, noting that their goal had been achieved despite some limitations. They decided to wrap up the session as they were pleased with the progress made.

Drupal Field Mapping to React

Michael and Ted discussed mapping Drupal field types to React components and props. They explored how text and formatted text can be handled in the system, with Ted confirming that formatted text currently needs to be mapped to props. They also discussed the need for a paragraph component that supports formatted text. Michael considered how content creators would interact with the system, including the process of adding body fields and other content types to the page layout.

Drupal Canvas Field Mapping Demo

Ted and Michael demonstrated how to map fields to props and slots in Drupal Canvas, highlighting the process of adding and configuring components. They noted some rough edges and bugs that need to be addressed, but expressed excitement about the progress and potential of Drupal Canvas. Michael acknowledged the significant resources Acquia has invested in the project and emphasized its benefits for the broader Drupal community.

Add new comment