All drupal core themes contain plugin_id class for blocks in block.html.twig template. My bootstrap subtheme shows only "block clearfix" classes by default . Can we add plugin_id for blocks in base drupal bootstrap theme.

set classes = [
    'block',
    'clearfix',
    'block-' ~ configuration.provider|clean_class,
    'block-' ~ plugin_id|clean_class,
  ]
%}
<section{{ attributes.addClass(classes) }}>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

levmyshkin created an issue. See original summary.

levmyshkin’s picture

Patch for this is here:

jorgediazhav’s picture

Status: Active » Needs review
jorgediazhav’s picture

Status: Needs review » Reviewed & tested by the community

You are right, all core themes come with it.

Reviewed. Works fine.

seworthi’s picture

Reviewed, works as expected, patch applies correctly.

  • markcarver committed e09756d on 8.x-3.x authored by levmyshkin
    Issue #2727367 by levmyshkin: Add block plugin_id to classes to identify...
markhalliwell’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.