0

I'm creating blocks in modules and wish to have the block body (content) editable by admins. I'm using hook_block_configure and hook_block_save to accomplish this. Where is a good place to store the block body when edited by the admin (variable is apparently not suitable for larger values like this)?

I was thinking of just creating a custom table in hook_schema but that seems a lot for just one or two rows of data. Plus I would be doing this for several modules that need to provide blocks but also have their content editable by the admin. That's why it would be nice if there was a general storage table like variable but for larger values.

What would be a better way to accomplish this?

1 Answer 1

0

Have you looked at Nodeblock?

There is not a general storage table like variable for larger values.

I would consider creating a content type; using the nodes from that content type to programmatically create the blocks, using taxonomy to get finer control if necessary; then admins can just edit the block content like they would a node.

1
  • Thanks for the great ideas! I don't have enough reputation to upvote just yet. Jul 26, 2013 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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