In order to theme a node creation/edit form, one might typically create form-mynode.tpl.php and then add the following to template.php:
function mytheme_theme(){
return array(
'mynode_form' => array(
'arguments' => array('form' => NULL),
'template' => 'form-mynode',
),
);
}
However, a Zen subtheme already has a mytheme_theme function:
/**
* Implementation of HOOK_theme().
*/
function mytheme_theme(&$existing, $type, $theme, $path) {
$hooks = zen_theme($existing, $type, $theme, $path);
// Add your theme hooks like this:
/*
$hooks['hook_name_here'] = array( // Details go here );
*/
// @TODO: Needs detailed comments. Patches welcome!
return $hooks;
}
How should the code at the top be incorporate into this mytheme_theme function?
Comments
Comment #1
jasonawantHi,
I think I've managed to specify a new template file as follows. However, the new template file needs to live in the themes root, /sites/all/theme/your_theme/ instead of /sites/all/theme/your_theme/templates/node/ or /sites/all/theme/your_theme/templates/form.
Jason
Comment #2
johnalbinThere's a toggle for which theme to use for "node edit" forms. That is provided by core.