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

查看drupal theme 模板变量小技巧

可以使用

<?php
print var_dump(get_defined_vars());
?>

当然也可以使用print_r($node) ,这样就很方便了。

查看drupal theme 模板变量这两个小技巧够用了。

在开发的时候,经常遇到输出变量的问题。

不知道到底是什么样的形式,这是就可以用它们来处理,

然后打开网页,查看源代码,就可以看到整齐的变量。算是比较整齐有次序的结构。

评论

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 自动断行和分段。
  • 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.