Skip to main content
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Source Link

@Cottser answer works@Cottser answer works. I just modified it to keep the right specificity using array_splice, otherwise the bundle type template gets applied later in the chain than block instance suggestions.

$suggestion = 'block__' . $content['#block_content']->bundle();
array_splice( $suggestions, 2, 0, $suggestion );

There is an issue to fix this in core for all entities

https://www.drupal.org/node/2270883

@Cottser answer works. I just modified it to keep the right specificity using array_splice, otherwise the bundle type template gets applied later in the chain than block instance suggestions.

$suggestion = 'block__' . $content['#block_content']->bundle();
array_splice( $suggestions, 2, 0, $suggestion );

There is an issue to fix this in core for all entities

https://www.drupal.org/node/2270883

@Cottser answer works. I just modified it to keep the right specificity using array_splice, otherwise the bundle type template gets applied later in the chain than block instance suggestions.

$suggestion = 'block__' . $content['#block_content']->bundle();
array_splice( $suggestions, 2, 0, $suggestion );

There is an issue to fix this in core for all entities

https://www.drupal.org/node/2270883

Source Link

@Cottser answer works. I just modified it to keep the right specificity using array_splice, otherwise the bundle type template gets applied later in the chain than block instance suggestions.

$suggestion = 'block__' . $content['#block_content']->bundle();
array_splice( $suggestions, 2, 0, $suggestion );

There is an issue to fix this in core for all entities

https://www.drupal.org/node/2270883