2010-05-06 77 views
1

我正在使用drupal 6.我设法为一个内容类型制作一个.tpl文件,即用于图像库中的图像。我这样做,在template.php文件添加以下代码:主题节点创建和节点编辑模板

function artbasic_theme($existing, $type, $theme, $path) { 
    return array(
    'galleryimage_node_form' => array(
     'arguments' => array('form' => NULL), 
     'template' => 'galleryimage_node_form' 
    ) 
); 
} 

然后我创建galleryimage_node_form.tpl.php,并且是好去。现在发生这种情况,我希望为其他内容类型的表单创建其他模板文件,例如link_contrib_node_form.tpl.php。我尝试了几种方法来改变这个功能,以包括更多的内容类型,但我无法弄清楚。谁能帮忙?

回答

1
function artbasic_theme($existing, $type, $theme, $path) { 
    return array(
    'galleryimage_node_form' => array(
     'arguments' => array('form' => NULL), 
     'template' => 'galleryimage_node_form' 
    ), 
    'link_contrib_node_form' => array(
     'arguments' => array('form' => NULL), 
     'template' => 'link_contrib_node_form' 
    ), 
); 
} 
+0

我已经试过那个。它没有效果,即使它看起来应该可以工作。 – Toxid 2010-05-06 23:30:21

+0

碰到这个后清空缓存在性能... – Nikit 2010-05-07 12:23:15

+0

其实,我做到了,它仍然没有工作。但是今天当我再次启动电脑时,它突然发生了!也许这是一些浏览器缓存之前阻止,我不知道。不管怎么说,还是要谢谢你! – Toxid 2010-05-07 17:28:10