Php 为节点创建和编辑模板设置主题
我正在使用Drupal6。我已经成功地为一种内容类型创建了一个.tpl文件,即我的图像库中的图像。为此,我在template.php中添加了以下代码:Php 为节点创建和编辑模板设置主题,php,drupal,templates,coding-style,themes,Php,Drupal,Templates,Coding Style,Themes,我正在使用Drupal6。我已经成功地为一种内容类型创建了一个.tpl文件,即我的图像库中的图像。为此,我在template.php中添加了以下代码: function artbasic_theme($existing, $type, $theme, $path) { return array( 'galleryimage_node_form' => array( 'arguments' => array('form' => NULL),
function artbasic_theme($existing, $type, $theme, $path) {
return array(
'galleryimage_node_form' => array(
'arguments' => array('form' => NULL),
'template' => 'galleryimage_node_form'
)
);
}
然后我创建了galleryimage\u node\u form.tpl.php,很好用。现在,我想为其他内容类型的表单创建其他模板文件,例如link_contrib_node_form.tpl.php。我尝试了几种方法来改变这个函数,使其包含更多的内容类型,但我想不出来。有人能帮忙吗?我已经试过了。它没有效果,尽管它看起来应该能工作。事实上,我做到了,但它仍然不能工作。但是今天当我再次启动电脑时,它突然工作了!我不知道,也许是浏览器缓存阻止了它。无论如何谢谢你!我已经试过了。它没有效果,尽管它看起来应该能工作。事实上,我做到了,但它仍然不能工作。但是今天当我再次启动电脑时,它突然工作了!我不知道,也许是浏览器缓存阻止了它。无论如何谢谢你!
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'
),
);
}