StandardDisplayBuilder::buildRegions should use block_list theme, not suffix/prefix

Created on 20 October 2016, about 8 years ago
Updated 10 March 2024, 9 months ago

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.

✨ Feature request
Status

Needs review

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

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.

  • πŸ‡·πŸ‡ΊRussia kostyashupenko Omsk

    Bump. 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 these hardcode we getting extra wrapper. What's most important is that we don't have control on these extra divs.

  • πŸ‡«πŸ‡·France andypost

    @kostyashupenko any proposal about how to fix?

  • Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    Waiting for branch to pass
  • @kostyashupenko opened merge request.
  • Status changed to Needs review about 1 year ago
  • πŸ‡·πŸ‡ΊRussia kostyashupenko Omsk

    Proposal commited

  • πŸ‡«πŸ‡·France andypost

    @kostyashupenko your MR just removing wrapper instead of using block_list

Production build 0.71.5 2024