I'm trying to create a theme function, with a template:
/**
* Implements hook_theme().
*/
function mycustomtheme_theme($existing, $type, $theme, $path) {
return array(
'custom_function' => array(
'template' => 'my-template',
),
);
}
The my-template.tpl.php file is in the module directory and it works, I have added this to my page.tpl.php:
<?php print theme('custom_function', array()); ?>
I've tried to copy that template on my theme, but it doesn't work, Drupal always reads the module template, not the theme.
Have I forgotten something?