The Problem
Drupal Canvas places blocks through its own component tree instead of core's block layout. Each block it places gets a universally unique identifier (UUID) as its ID. Core turns that ID into a template suggestion, the file name a theme can provide to change a block's markup. UUIDs contain hyphens, and Drupal never matches a template file to a suggestion with a hyphen in it.
Canvas also never hands the block its region. Without it, a theme cannot give the header's menu different markup from the footer's.
What I Built
I built Canvas Block Twig Suggestions, a contributed module for anyone theming a Canvas site. I wrote it with AI-assisted development in Claude Code, and a working version came together in one evening. For every block Canvas places, it drops the suggestions made from the UUID. When the block sits in a theme region, it adds one made from the region and the block's plugin ID. The main menu in the footer, for example, can use block--footer--system-menu-block-main.html.twig.
Core's own suggestions stay below the new one, so templates a theme already has keep working. The module has no settings. Once you enable it, Twig debug lists the new file names above each block.
The Result
Every block in this site's footer has a template named for its region. The header shows the same main menu with markup of its own. I tell the full story, from the first version to where the region comes from, in the post Drupal Canvas block templates by region.
Version 1.0.0 came out on February 12, 2026, and you can get it from the project page on drupal.org. It needs Drupal 11 and Canvas, and the release is covered by the Drupal security advisory policy. For the week of October 11, 2026, drupal.org counted 133 sites using it.
I also proposed the idea in an issue for Canvas itself, and a merge request that builds it in is open there. When Canvas ships it, I plan to deprecate the module and point users there. A Drupal 12 release is also on the way.
