Can I override a theme function with a .tpl file?
Posted
by Nick Lowman
on Stack Overflow
See other posts from Stack Overflow
or by Nick Lowman
Published on 2010-04-13T15:40:07Z
Indexed on
2010/04/13
15:43 UTC
Read the original article
Hit count: 286
Hi everyone,
How would I go around overriding a theme function with a .tpl
file? I know how to override a .tpl
file with a theme function but not the other way round. I can't seem to find anywhere that tells me so, so maybe it's not possible or not good practise.
For example if there was a theme function defined in a module called super_results
and registered with the theme registry, like the example below, how would I go around overriding it with super_results.tpl.php
.
'super_results' => array(
'arguments' => array('title' => NULL, 'results' => NULL, 'votes' => NULL),
),
function modulename_super_results($title, $results,$votes){ output HTML }
© Stack Overflow or respective owner