January 20, 2021
The following template suggestion (placed in your theme's .theme file) will give you field template suggestions per entity type, e.g. field--node.html.twig, field--group.html.twig, field--media.html.twig, etc. I wanted to theme all fields in Groups the same way, and didn't want to have to create field templates for each group type, which was the least granular template suggestion available.
This…
Continue reading Template suggestion for field templates per entity type - Drupal 8 & 9
August 4, 2020
By default you get the following page template suggestions for a Commerce product:
page--product--[ID].html.twig
page--product--%.html.twig
page--product.html.twig
page.html.twig
Here's a template suggestion for custom page templates per product type:
/** * Add page templates for Commerce product types * Example: page--product--event.html.twig *//** * Implements…
Continue reading Drupal 8 theme suggestion for Commerce product page template per product type