Layout Builder Section Variations
This module lets you create and manage different section variations in Drupal's Layout Builder to customize section appearances. It also provides template suggestions for easy layout customization based on the selected variation.
Requirements
This module requires the following modules to be installed:
- Drupal core ^10 || ^11
- Layout Builder
Installation
- Install the module as you would normally install a contributed Drupal module.
Visit https://www.drupal.org/docs/8/extending-drupal-8/installing-contributed-modules for further information. - After installation, visit the Section variations page to configure
the available variations.
Use cases
- Define multiple section variations in order to alter the section appearance
- Override a specific Layout builder section template
Configuration
This module adds a configuration page where you can define multiple Section variations. The configuration page can be found at /admin/config/content/layout-builder-section-variations
Usage
- Once the module is enabled and configured, you can start using it on the
Layout. - When you add/edit a section, you will see a new field called
"Variation". This is a list of all definedSection variations. - The selected
Section variationwill be available in thetheme hook suggestions. For example: TheDefaultvariation (on a "One column" layout) will now allow you to override thelayout.html.twig,layout--onecol.html.twig,layout--default.html.twigandlayout--onecol--default.html.twigtemplates.
Support
This is a contrib module and as such, it's not officially supported by the
Drupal community. However, you can open an issue on the module's page on
drupal.org if you find any bugs or have any feature requests.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.