Drupal Pressflow problem with hook_block -
i'm having troubles implementing hook_block hook in clean pressflow installation. reason outputs arrayarray blocks. reason $info variable in theme function set to:
["block"]=> array(7) { ["function"]=> string(10) "fwtb_block" ["include files"]=> array(0) { } ["type"]=> string(12) "theme_engine" ["theme path"]=> string(21) "sites/all/themes/fwtb" ["arguments"]=> array(1) { ["block"]=> null } ["theme paths"]=> array(2) { [0]=> string(14) "modules/system" [1]=> string(21) "sites/all/themes/fwtb" } ["preprocess functions"]=> array(2) { [0]=> string(19) "template_preprocess" [1]=> string(25) "template_preprocess_block" }
}
as can see overwritten custom hook_block method. thinks blocks should rendered using fwtb_block method returns array containing subject , content. that's why prints arrayarray. idea going wrong here?
this hook_block implementation:
function fwtb_block($op = 'list', $delta = 0, $edit = array()) { switch ($op) { case 'list': $blocks['sidebar_description'] = array( 'info' => t('sidebar description'), 'cache' => block_cache_global, 'status' => true, 'region' => 'left', 'visibility' => 0, 'custom' => false ); return $blocks; case 'configure': $form = array(); return $form; case 'save': return; case 'view': default: switch ($delta) { case 'sidebar_description': $block['subject'] = t('block_subject'); $block['content'] = t('block_description'); break; } return $block; }
}
kind regards, daan
after taking fresh setup saw problem was. had theme , module same name. caused conflicts :/
Comments
Post a Comment