We Recommend

HTML: The Definitive Guide HTML: The Definitive Guide
They teach you that learning HTML is like learning any other language and that reading a book of rules can only take you so far. Readers begin writing what may be their first Web page just two pages into the book's second chapter. From there on, they provide a wide range of HTML coding to allow readers to learn from good examples. The book includes a handy "cheat sheet" of HTML codes for quick reference.


Posted By

marcoba on 10/04/07


Tagged

php drupal phptemplate theming mostused


Versions (?)


Who likes this?

4 people have marked this snippet as a favorite

arcturus
basicmagic
kellyharding
panatlantica


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.