Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When building a page, we're stuck with the default block wrapping HTML and class.
$region_name = Html::getClass("block-region-$region");
$build[$region]['#prefix'] = '<div class="' . $region_name . '">';
$build[$region]['#suffix'] = '</div>';
This should go inside of a block_list
theme, or something. Maybe region? There's no way to change this behavior.
Issue fork panels-2820617
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mglamanRelevant Page Manager issue w/ proposed fix #2756613: Avoid #prefix and #suffix in buildRegions(), use #theme_wrappers instead
Comment #3
andypostbasically this should be fixed by style plugins
Comment #4
DamienMcKennaComment #5
kostyashupenkoBump. We are trying to kick these hardcoded prefixes / suffixes on all our projects all these years. To me - i don't think it's useful somehow (at least we can make it optional with some checkbox in admin back office?). Front-end world is expecting render of one/several block's divs right inside region's div, but with such hardcode we getting extra wrapper. What's most important is that we don't have control on these extra divs, so becomes annoying
Comment #6
andypost@kostyashupenko any proposal about how to fix?
Comment #8
kostyashupenkoProposal commited
Comment #9
andypost@kostyashupenko your MR just removing wrapper instead of using
block_list