[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.
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.
相关文章推荐
- How to use the same thread function for multiple threads (safely)
- How to use the function of assembly.
- How to use the pointer of function in a class?
- How to use the function of assembly.
- OA Framework - How to Find the Correct Version of JDeveloper to Use with E-Business Suite 11i or Release 12.x (Doc ID 416708.1)
- How to Get the Function Code in R
- How to use the JFace Tree Viewer(TreeViewer)--1
- DeprecationWarning: Calling an asynchronous function without callback is deprecated. - how to find where the “function:” is?
- How To Use Function 'F4_FILENAME' and 'KD_GET_FILENAME_ON_F4'
- This function has none of Deterministic,no sql,or reads sql data in its declaration and binary logging is enabled(you *might* want to use the less safe log_bin_trust_function_creators variable
- The study of how to define a function in Python(20170907)
- ABAP--How to use Number Ranges' Function?
- [Drupal] How to display the month in French words.
- How-to: Use the ShareLib in Apache Oozie (CDH 5)
- How to use the windows active directory to authenticate user via logon form 如何自定义权限系统,使用 active directory验证用户登录
- How-to: Use the ShareLib in Apache Oozie
- jooq使用自定义策略生成代码(How to use a custom strategy with the jOOQ code-generator and Maven?)
- How to Use the Visual C++ DEBUGGER
- how to get the function back trace in php
- STM32F4 -- How to use the DMA burst feature