继续Drupal分享精神 QQ群:107748121 站长QQ:2275288328 skype: hellodrupal【drupal交流+drupal 建站+theme制作】
登录 注册

重构drupal添加 表单form [phptemplate_preprocess_node_form]

1、当我们创建内容的时候,默认的表单可能需要来点改变,这时我们可以使用phptemplate_preprocess_node_form来处理表单,让它重构 2、具体步骤 1)现在你的主题目录下建立一个node-form.tpl.php文件 代码如下:
2)然后也在主题目录下建立一个template.php文件,我们主要 代码如下: type; if($form['#node']->type == 'story'){ $vars['buttons'] = $form['buttons']; unset($form['buttons']); $vars['title'] = $form['title']; unset($form['title']); } ?> 刷新缓冲 效果图

评论

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 自动断行和分段。
  • You can use BBCode tags in the text.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

更多关於格式化选项的信息

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.