So when creating a Drupal site (for example) it's a very common development helper to print the variables of a form etc. at the top of the page, e.g. using dpm()
(assuming the devel module is installed).
I'm having trouble grokking all the ways to do this, and the contexts in which they can be used.
For example, I can use dpm($form)
within an implementation of hook_form_alter in my custom module. No problem, the variables are printed nicely at the top of the page.
Now, if I look at a template, say, node.tpl.php I see that there are a load of available variables used to construct the page. So if I pick one, e.g. $links, I would've thought that adding <?php dpm($links); ?>
to node.tpl.php would print the variables out for me. But no!
Why is this, what am I doing wrong? :)