This project is not covered by Drupal’s security advisory policy.

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

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 defined Section variations.
  • The selected Section variation will be available in the theme hook suggestions. For example: The Default variation (on a "One column" layout) will now allow you to override the layout.html.twig, layout--onecol.html.twig, layout--default.html.twig and layout--onecol--default.html.twig templates.

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.

Project information

Releases