欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

drupal 查看变量

shiping1 的头像

I would put dsm($vars) in a preprocess function in template.php. Just remember if you put it in phptemplate_preprocess_page it will show you the available variables for the page.tpl.php. Likewise if you put it in phptemplate_preprocess_node it will show you the available variables for node.tpl.php.

If you want to see the available variables from a template file, you can also use get_defined_vars(). Use something like:

 var_dump(get_defined_vars());
 or
 dsm(get_defined_vars());

普通分类: