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.
There are multiple ways different contrib modules render blocks that do not end up in a block_view_alter() call. For instance, using Display Suite to display a block field.
I found that instead of using hook_block_view_alter, you can use hook_preprocess_block() and achieve the same result, but you are targeting all renderings of blocks.
Comment | File | Size | Author |
---|---|---|---|
#1 | preprocess_block-2210779-1.patch | 2.85 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #2
kmontyIt appears your patch includes functionality that is not relevant to this issue. Can you re-roll it against -dev?
Comment #4
kmontyRe-rolled the patch myself and committed to dev. Thanks!