The example for the list op:

  if ($op == 'list') {
    $blocks[0] = array('info' => t('Mymodule block #1 shows ...'),
      'weight' => 0, 'enabled' => 1, 'region' => 'left');
    $blocks[1] = array('info' => t('Mymodule block #2 describes ...'),
      'weight' => 0, 'enabled' => 0, 'region' => 'right');
    return $blocks;
  } 

Seems to imply you should hard-code the enabled and region for each block. Of course doing this means that you can't change it with the admin interface. Confusing for new developers.

Comments

pwolanin’s picture

Yes, this doesn't seem right as an example. I didn't even realize the region could be hard-coded.

nancydru’s picture

Why is that stuff in op=view? That's configuration stuff, it should only be in op=configure.

nancydru’s picture

Why is that stuff in op=list? That's configuration stuff, it should only be in op=configure.

nancydru’s picture

Status: Active » Closed (fixed)