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.
As of 4.7 we can set all block properties in the hook_block. (This is a change made as part of the block region patch, but one I evidently forgot to document.) So it seems slightly cleaner to do this rather than using a manual db insert.
(I haven't tested this patch.)
Comment | File | Size | Author |
---|---|---|---|
#2 | devel-block_0.patch | 926 bytes | nedjo |
devel-block.patch | 1.41 KB | nedjo | |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedwow, good tip. committed.
Comment #2
nedjoSorry, I was remembering wrong.
We can indeed preset $block values, but (logically) we do it in the 'info' op, not in 'view'.
Here's a revised patch.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedComment #4
(not verified) CreditAttribution: commented