[support] hook_block Headache
Fred Jones
fredthejonester at gmail.com
Tue Jun 16 22:58:52 UTC 2009
I am failing to get hook_block to work in D6 so I tried reducing my
code to the very simplest and it still fails. I copied code from
http://www.packtpub.com/article/creating-our-first-module-using-drupal6-part1
and now have nothing more than this in my module file:
<?php
/**
* Implementation of hook_block().
*/
function mymod_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {
case 'list':
$blocks[0]['info'] = t('Goodreads Bookshelf');
return $blocks;
case 'view':
$blocks['subject'] = t('On the Bookshelf');
$blocks['content'] = t('Temporary content');
return $blocks;
}
}
When this module is enabled, no blocks appear on my site whatsover. If
I disabled it OR just remove that code, then the blocks appear.
This is bizarre, no?
More information about the support
mailing list