Posted By

marcoba on 10/04/07


Tagged

php drupal phptemplate theming mostused


Versions (?)

Who likes this?

8 people have marked this snippet as a favorite

arcturus
basicmagic
kellyharding
panatlantica
nerdfiles
EkTrOn
michellebracken
zack


Drupal: output theme variables


 / Published in: HTML
 

URL: http://www.group42.ca/theme_variable_total_visibility

Drupal snippet: outputs all theming variables of a content type or page. Add to template.php the following function:

function phptemplatevariables($hook, $vars) { return array('vars_data' => $vars); }

then add the snippet to the relative node.tpl.php file.

  1. <pre><?php print htmlentities(print_r($vars_data, 1)) ?></pre>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: marcoba on October 4, 2007

alternatively the more generic:



,



or the extensive


Posted By: marcoba on October 4, 2007

alternatively the more generic:

<pre><?php print_r($node) ?></pre>

,

<pre><?php print_r($array_var) ?></pre>

or the extensive

<pre><?php print_r(get_defined_vars()) ?></pre>

You need to login to post a comment.