2010-05-06 78 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