主题化节点创建和节点编辑模板
我正在使用 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。我尝试了几种方法来更改此函数以包含更多内容类型,但我无法弄清楚。有人可以帮忙吗?
I'm using drupal 6. I've managed to make a .tpl file for one content type, that is for images in my image gallery. I did that by adding this code in template.php:
function artbasic_theme($existing, $type, $theme, $path) {
return array(
'galleryimage_node_form' => array(
'arguments' => array('form' => NULL),
'template' => 'galleryimage_node_form'
)
);
}
And then I created galleryimage_node_form.tpl.php, and was good to go. Now it happens so that I want to have other template files for the forms of other content types, for example link_contrib_node_form.tpl.php. I've tried a couple of ways to change this function to include more content types, but I can't figure it out. Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)