Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Role Theme Switcher Module role_theme_switcher crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

Fences Block

54 sites Security covered
View on drupal.org

This module allows you to change block-level element tags or add classes within block configurations. It works with both content and configuration blocks that use the block.html.twig template.

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

Tracked releases
1
Tracked since
Jul 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
2.0.0 Stable Jul 9, 2026