How to switch from using a theme function into using a template? there's a part of a page that I want to theme, and it's currently themed by a theme function (theme_hook). How do I change it to use a template instead? Does it have something to do with hook_theme_registry_alter?

If it is that hook, I checked the variable passed in hook_theme_registry_alter and I'm not sure what exactly to alter. Do I just add a 'template' key? Or do I have to also unset something? How does it know whether to use a template or theme function anyway?

I'm in Drupal 7 by the way.
As described in the documentation for hook_theme(), the property that you need to provide in order to use a template file instead of calling the theme function is template.


  template: If specified, this theme implementation is a template, and this is the template file without an extension. Do not put .tpl.php on this file; that extension will be added automatically by the default rendering engine (which is PHPTemplate). If 'path', above, is specified, the template should also be in this path.


As you are altering the theme function implemented from another module, you are probably interested in setting also the path property.


  path: Override the path of the file to be used. Ordinarily the module or theme path will be used, but if the file will not be in the default path, include it here. This path should be relative to the Drupal root directory.