/**
* hook_theme() //在你的module下面添加,如果你想添加到自己的theme下面,你可以直接写在theme下面的hook_theme下面即可
*/
function my_module_theme($existing, $type, $theme, $path){
return array(
'article_node_form' => array(
'render element' => 'form',
'template' => 'template/path_test_three',
),
);
}
然后在my_module/template/path_test_three.tpl.php里面将form重写
<?php print render($form['title']);?>
<?php print render($form['body']);?> //前面的输出就是为了布局
<?php print drupal_render_children($form) ?> //这句话用于生成该完全的form
类似的,你要重写登录与注册表单,都是一个原理。
想阅读更多资料,请到官网阅读