I want to update the configuration (weight, pages, region) of some blocks within an update function. I know I could do this directly inside the database. Is there a better way of doing this? I scanned http://api.drupal.org, but I didn't find anything like block_load() and block_save().

Do you have any idea?

1 Answer 1


No, there is no such thing.

One of the typical update block configuration tasks was changing the cache flag (before 6.22, that is). You can find updates that mess with the {block} table directly in many projects, including mine: privatemsg_update_6002().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.