Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Fences Block

Security covered Maintenance fixes only 53 sites

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:

Drupal 8–11

Ask your assistant about Fences Block

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

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Jan 2023
Latest release
4 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.0 Stable 8–11 Jul 9, 2026
2.0.0-rc4 Pre-release 8–11 Aug 9, 2024
2.0.0-rc3 Pre-release 8–10 Jun 11, 2024
2.0.0-rc2 Pre-release 8–10 Jan 23, 2023