Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Layout Builder Block Decorator

Security covered Maintenance fixes only 3 sites

This module provides an API that allows users to wrap and decorate blocks within Drupal's Layout Builder without writing code. It enables adding prefix and suffix markup, or applying CSS classes to a block's wrapper element directly through the user interface. Developers can also create custom decorators as new plugins.

Layout Builder block decorator is mainly an API module that provides a new plugin type which allows wrapping and decorating blocks added in layouts. Imagine for example the usecase where editors would want to add a wrapper element or a suffix to a block without touching code. This module makes this possible via the UI. More advanced decorators can be implemented as new Plugins of type BlockDecorator.

Features

  • A block decorator plugin that allows adding prefix and suffix markup to blocks.
  • Another decorator to add classes to a block's wrapping html element.
  • The API to implement custom decorators.

Post-Installation

  1. Once you installed the module as usual via the UI or Drush, create a node and edit its layout to add a new block of any type.
  2. On the layout edit form, click on the contextual links of the added block and select Decorate block.
  3. On the form that open in the tray, select the decorator plugin you want to apply on the block and configure it on the form that appears once you selected it.

Additional Requirements

This mode requires the Layout Builder module which ships with Drupal core.

Ask your assistant about Layout Builder Block Decorator

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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.

Activity

Tracked releases
1
Tracked since
Jul 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
1.0.x-dev Dev 10–11 Jul 25, 2023