if I set my $blocks array like this: case 'list': $blocks[0] = array('info' => 'name'); $blocks[1] = array('info' => 'name'); $blocks[2] = array('info' => 'name'); only the first one appears on Blocks config page I just changed to this: $blocks[] = array('info' => 'name'); $blocks[] = array('info' => 'name'); $blocks[] = array('info' => 'name'); And worked!! All three shows up I tested with this example, same problem: http://api.drupal.org/api/function/hook_block/6 Feijó
Clearly, there must already be some values in the $blocks array. The first code fragment is overwriting some of them, while the second code fragment is appending to them. If $blocks is undefined to start, both code fragments produce exactly the same array. ..chris
I output with print_r($blocks); in BOTH codes, same values was printed!!! Very wierd Feijó ----- Original Message ----- From: "Chris Johnson" <cxjohnson@gmail.com> To: <development@drupal.org> Sent: Thursday, January 03, 2008 6:36 PM Subject: Re: [development] block hook problem on D6
Clearly, there must already be some values in the $blocks array. The first code fragment is overwriting some of them, while the second code fragment is appending to them.
If $blocks is undefined to start, both code fragments produce exactly the same array.
..chris
participants (2)
-
Alessandro Feijó -
Chris Johnson