Add a switch to enable/disable Fences Blocks and its block--fences.html.twig override

Created on 23 January 2023, almost 2 years ago
Updated 17 February 2023, almost 2 years ago

Problem/Motivation

See this: https://www.drupal.org/project/fences_block/issues/3304939 🐛 Theme suggestions still in the wrong order (at least a bit) [beta3 / 2.x custom theme conflict] Closed: won't fix

Currently Fences Blocks will override each block.html.twig template, no matter if the block markup needs to be customized.
As described in issue 🐛 Theme suggestions still in the wrong order (at least a bit) [beta3 / 2.x custom theme conflict] Closed: won't fix , this could *otherwse* damage contrib theme & module implementations of the block template.

Steps to reproduce

Proposed resolution

Add a checkbox to each block instance, to explicitly enable fences for that block.
Checking this option will force the block instance to use the block--fences.html.twig, instead of the theme's block.html.twig.

For most comfort, we could define the global behavior on a settings page and allow overriding the default per block.
In a first step, we may also leave out the override.

Default should be "false" so that the module generally behaves like before, but you can opt-in.

The global option could be implemented using https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...

While I'm not sure yet, how to implement the overwrite per block. Any ideas?

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

2.0

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024