function vocabindex_theme()
{
	$functions=array();
	
	$functions['theme_vocabindex_list']=array(
		'template'=>'vocabindex_list',
		'arguments'=>array(
			'list_items'=>NULL,
		),
	);
	
	$functions['theme_vocabindex_list_item']=array(
		'template'=>'vocabindex_list_item',
		'arguments'=>array(
			'tid'=>NULL,
			'name'=>NULL,
			'description'=>NULL,
			'zebra'=>NULL,
		),
	);
	
	return $functions;
}
$output.=theme('vocabindex_list_item', $row->tid, $row->name, $row->description, ($i%2==0?'even':'odd'));

//and

$output=theme('vocabindex_list', $output);

Somehow the theme functions are not properly called by theme(). I keep getting a blank screen. When I call the functions directly (so without using theme()) it works without problems. It's probably some very tiny error I've made, but I can't find it.

Comments

Folkert’s picture

your function name is the other way around. just change that back to how it's suppoed to be

function theme_vocab_index(...

edit: sorry i see you use drupal 6 in that case delete the 'theme' from

$functions['vocabindex_list']= //etc

   //and
    $functions['vocabindex_list_item']
xano’s picture

I appreciate the help, but that wasn't what was wrong. I put the 'theme_' prefix before the function names in hook_theme(). Removing them made it all work.

//edit: Ah, F, you dirty... :-P Quietly editing your post, ey? ;-)