By micobros on
Hello,
I've been trying yesterday afternoon to create a custom theme function for the theme_item_list(). In my page.tpl.php i use this code :
$output = theme('item_list', $items);
print $output;
If no override is done, Drupal would take its theme_item_list function in /includes/theme.inc
But, according to http://drupal.org/node/171188 all you need to do is add a function in your template.php.
While following this guide, here's what I did:
mytheme.info
; $Id: mytheme.info,v 1.5
name = mytheme
description = mytheme private .
version = VERSION
core = 6.x
engine = phptemplate
template.php
function phptemplate_item_list ($items = array(), $title = NULL, $type = 'ul', $attributes = NULL) {
return $output.'<h1>testing?</h1>';
}
page.tpl.php
$output = theme('item_list', $items);
print $output;
As you would've probably guessed... this didn't change anything. Drupal just doesn't take or execute this function.
Is there something I missed?
Thanks for you help,
cheers,
micobros
Comments
Try
Try only in the file template.php :
or see: http://drupal.org/node/11811