Skip to main content

Controlling block page display options programatically

You can set the region, the weight and the path of custom block in a custom module like this: function hook_block_info(){ $blocks = array(); $blocks['my_custom_block'] = array( 'info' => t('Custom Block Options'), 'status' => TRUE, 'theme' => 'MY_THEME', 'region' => 'MY_REGION', 'weight' => 0, 'visibility' => BLOCK_VISIBILITY_LISTED, 'pages' => "aboutus/*", 'custom' => FALSE ); return $blocks; } You can find the theme / region settings-options at your sites/all/themes folder usually in the file More details here:!block!block.api.php/function/…
custom block block