![](/img/trans.png)
[英]how to theme form in edit/add mode - optionwidgets / content taxonomy widget/other weights drupal
[英]Drupal 6 theme add / edit content form
Drupal 6主题添加/编辑内容表单
在Drupal 6中,我们可以添加新的内容类型“ content-type”。 我们想通过模板文件设置主题/ node / add / content-type。 我们还希望通过模板文件将此内容类型的编辑表单/ node / $ nid / edit设置为主题。 这个怎么做?
为此,您需要了解Drupal中tpl文件的命名约定。 该链接将帮助https://www.drupal.org/node/1089642
根据文档,
"http://www.example.com/node/1/edit" would result in the following suggestions:
page-node-edit.tpl.php
page-node-1.tpl.php
page-node.tpl.php
page.tpl.php
您可以按照建议的方式尝试在内容中添加content-type(我个人没有尝试过),或者如果要做的自定义很少,则可以添加如下检查
<?php if($node->type == 'content_type_name') ?>
超过“ page-node-edit.tpl.php”中的可用变量也可以。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.