By bigheadfish on
function school_block ($op='list' , $delta=0, $edit=array()) {
switch ($op) {
case 'list':
$blocks[0] = array(
'info' => 'School Header',
'status' => 1,
'region' => 'header',
);
... ...
At admin/build/block/list, block 'School Header' is listed, but not in 'header' region, but listed as 'Disabled'. I cleared my cache and still does not work.
Please help, many thanks!
Comments
I'm looking at the
I'm looking at the block.module code and what you wrote looks like it should work--you've set status to 1, which is the key thing for setting a region (region is set to none if the block's status is not set to a non-null value).
Are you sure your theme implements the 'header' region? I know it is unlikely it does not, but worth asking. If the region is undefined you should get a status message popping up at you when the hook runs.
Are you comfortable debugging in running code? The code to poke through here is block.module, starting line 245. You could put a few print statements in there to figure out what's going on--crude but effective, just not on your production server of course.
Sorry i couldn't be mroe definitive, maybe I'm missing something simple that someone else can catch.