Theming with Bundle Classes, Layout builder and Twig
Daniel Veza
PreviousNext
Using Drupal since 2014
One of the best new additions to core
Keep business logic in a single place per entity
Code sharing, interfaces and traits
Better testability
Twig integration & less preprocesses
Editorial control of layout
Drag and drop interface
0-5 Minutes - Short
6-10 Minutes - Medium
11+ Minutes - Long
Goodbye Manage Display
block--bundle--life-story.html.twig
umami_override.theme
Lets compare
We've met the new requirement
Code is in the theme
Testing is difficult
Testing
Advanced
Add a base class per entity
Traits & code sharing
Design systems & Real world examples
Base classes per entity
Traits
Bundle classes resources:
Layout Builder modules used:
Questions