Main menu

A few ways to print all Drupal variables on a page

07 Jun
Published by Mark W. Breneman

To get the out put a view:In a global "null" Argument with php code of: dpm($view);

*see dpm note belowto get all of the vars on a page:<?php  print '<pre>';  var_dump(get_defined_vars()); print '</pre>';?>dpm or dsm dumps the var in the message area of your website. Note: dpm and dsm both need devel enabled to work.<span style="color: #66cc66;"><</span>?php
dpm<span style="color: #66cc66;">(</span>get_defined_vars<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">)</span>;
?<span style="color: #66cc66;">></span>

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.