0

Is there a way to have my blocks pre-assigned a region and also enabled / disabled in a profile installation? I don't want to go to the structure / block page and assign these blocks individually each time, but would rather have them setup on site installation.

0

You can use hook_block_info inside your custom module to add all of your blocks programmatically. Look at this SE Post for an example to use the hook_block_info to assign it to the right region and also enable/disable it by declaring status=>true/false.

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.