I am writing module for drupal 7. Module generates block and item list inside that block['content']. When i am using standard theme('item_list', array('items' => $items)) everything works, but when i want to define my own theme which will be used instead of item_list, block dissapears. I've been reading documentation and various examples, but nothing helped. In my module's file i wrote:
function lastposts_thm_theme() {
return array(
'lastposts_thm' => array(
'variables' => array('items' => NULL),
//template file, path, ....
),
);
}
function theme_lastposts_thm($variables) {
$node = $variables['items'];
$build = node_view($node);
$output = drupal_render($build);
return $output;
}
And when i call it from block_view function, it doesn't work theme('lastposts_thm', $...). Where i am mistaking?