您的位置:首页 > 其它

[Drupal] How to use the dsm function.

2011-01-06 17:44 295 查看
1. Install the devel module and enable it.

2. Make sure that in your themes, page.tpl.php for example, you have the code as below:

<?php print $messages; ?>

3. Where you want to see the sub-variables of a variable ($vars here is an example), just use the code:

<?php dsm($vars);?>

Note: When in Drupal 6, 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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: