Drupal is a registered trademark of Dries Buytaert
drupal 11.4.1 Update released for Drupal core (11.4.1)! drupal 11.4.0 Update released for Drupal core (11.4.0)! drupal 10.6.12 Update released for Drupal core (10.6.12)! drupal 11.3.13 Update released for Drupal core (11.3.13)! drupal 10.6.11 Update released for Drupal core (10.6.11)! drupal 11.3.12 Update released for Drupal core (11.3.12)! drupal 11.2.14 Update released for Drupal core (11.2.14)! drupal 10.5.12 Update released for Drupal core (10.5.12)! cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)!

The module allows a site builder to change block level element tags or add classes within the block configurations. It accounts for both content and configuration blocks that are rendered using the block.html.twig template.

Installation

  • Enable the fences_block module like normal.
  • Navigate to block layout e.g(/admin/structure/block).
  • Click "Place block" or "Configure" on an existing block under the operations.
  • Next change any configurations under the "Fences Block" fieldset; then save.

Important notice for themes overwriting block.html.twig or block--*.html.twig

You may need to use the markup from the block--fences.html.twig file in your overrides, if you need additional functionality like block wrappers. See #3304737: block--fences.html.twig does (and should?) not overwrite theme overwrites
Otherwise, these features will not work.

Layout Builder notice

The module currently doesn't work for custom blocks in layout builder due to core issues. See #3117170: Make fences available for all block types in layout builder

Versions

2.x
2.x is the SemVer successor of 8.x-1.0-beta3, so you can and should upgrade to 2.x without fear, if you are or were using 8.x-1.0-beta3 already.

8.x-1.x
8.x-1.0-beta4 is a based on 8.x-1.0-beta2 (before changing (& fixing) the loading order made in this issue: #3303750: Add basic tests by this commit.
Thus provides a way for older sites to use the module in <= beta2 state without being affected by unwanted overrides and gives them time to fix such issues.
8.x-1.x will only receive security updates and might be deprecated sooner or later. Please plan your upgrade to 2.x branch, reading the "Important notice for themes overwriting block.html.twig or block--*.html.twig" above!

Dependencies:

Activity

Total releases
1
First release
Jul 2026
Latest release
17 hours ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
2.0.0 Stable Jul 9, 2026