Get a list of field variables for template code For Drupal 7, how do I access (or generate) a list of all the field variables available for building a template (for a given content type)?

Some context: I used to rely on the (now deprecated) Contemplate module to write my templates. Directly within its interface, it would print a list of all of the available variables, like this.



It was quite handy. Now that I'm making disk-based templates and do not have this list generated by the Contemplate module, I'm confused as to how I might produce something similar for use as a reference.
Use Devel module and then with using get_defined_vars you can get a list of defined variables. then in you template file use the following snippet

&lt;?php
 dsm(get_defined_vars()); 
// or even  dsm(get_defined_vars()); 
?&gt;


and another solution is based on  hook_preprocess. just dumps the variables there.

on your template.theme file

mymodule_preprocess(&amp;$vars, $hook) {
dpm($vars);
}


**Update*
if you want to see the $variables on node template try on your template.

copy/paste this snippet on your template.php then clear the cache
function YOURTHEMENAME_preprocess_node(&amp;$variables) {
    dpm($variables);
    // you can add or remove whatever you want to it here
}

if your theme name is themetastic So

function themetastic_preprocess_node(&amp;$variables) {
    dpm($variables);
    // you can add or remove whatever you want to it here
}


Ref: Read this to learn more about preprocessing