[prev in list] [next in list] [prev in thread] [next in thread]
List: drupal-documentation
Subject: [documentation] [Documentation bug] hook_block example confusing
From: drupal-docs () drupal ! org (pwolanin)
Date: 2006-09-16 14:54:03
Message-ID: type=project&nid=84455&cid=137194&host= () drupal ! org
[Download RAW message or body]
Issue status update for
http://drupal.org/node/84455
Post a follow up:
http://drupal.org/project/comments/add/84455
Project: Documentation
Version: <none>
Component: Documentation in CVS
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: webchick
Updated by: pwolanin
Status: active
Yes, this doesn't seem right as an example. I didn't even realize the
region could be hard-coded.
pwolanin
Previous comments:
------------------------------------------------------------------------
Sat, 16 Sep 2006 03:24:18 +0000 : webchick
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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic