Add markup class to the featured posts block
This commit is contained in:
parent
4ff2d5f8c2
commit
8cfa76e9f4
|
@ -17,3 +17,13 @@ function custom_entity_type_build(array &$entityTypes): void {
|
|||
$entityTypes['node']->setClass(Node::class);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK().
|
||||
*/
|
||||
function custom_preprocess_block(array &$variables): void {
|
||||
// Add the 'markup' class to blocks.
|
||||
if (in_array($variables['plugin_id'], ['views_block:featured_blog_posts-block_1'])) {
|
||||
$variables['attributes']['class'][] = 'markup';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue