What Is the actual Drupal Way to Build list of teasers in Canvas?
With some excitement, I tried to build a site using Drupal Canvas. Not Drupal CMS, but actually building it from a clean installation. I rewired my thinking toward SDC, canvas pages, and canvas node templates, and after I fully understood it, I really thought Drupal might become a free-of-charge competitor to SaaS website builders like Webflow.
We talk about Drupal Canvas with excitement, but using it introduces two regressions for standard use cases compared to the old Drupal approach. Until these are solved, I do not see a wide adoption on production sites. The following:
First, it is not possible to switch other display types besides "full" to Canvas template. Drupal CMS somehow defines the Card display as managed by Canvas, but there is too much magic happening behind the scenes, which I was unable to replicate on my site. So if I have any view that should list some nodes in a form of a card/teaser, and let’s be honest, almost every site does, I am forced to use both a Canvas template for the full node and an old-style template file such as node--blogpost--teaser.html.twig, where I pass the props to SDC and mimic the Canvas usage for a teaser.
The second issue, no less important, is that the SDC with Canvas approach makes it impossible to use image styles. We are forced to use original images, and the canvas:image component has very limited functionality. Really? Image styles are one of the biggest advantages of Drupal.
How do you approach it? What is the actual "Drupal way" to build a list of cards with teaser images in Drupal Canvas based project? Is it there, or not yet?
Here are two related issues that i found regarding that, worth sharing:
https://www.drupal.org/project/canvas/issues/3562276
https://www.drupal.org/project/canvas/issues/3574412
This post is not intended to discredit Canvas, but simply to share a user’s experience and maybe help guide its development. Big thanks so far, keep going!
[link] [comments]