How do I find out the content type within template.php?
Im new to Drupal. Finding variables and displaying them the way i wanted was very important to me. So i used a code that works in any php script. But i recommend you to always to stick with the Drupal API.

Here is the magic code.

&lt;pre&gt;&lt;?php var_dump(get_defined_vars()); ?&gt;&lt;/pre&gt;


This will output all the available variables for the current page. However the page will be very long so don do this on your live production site. Test it on a local site or put your site in maintenance mode.

Also check the http://www.hoomanb.com/cs/QuickRef/drupal-7-theming-cheat-sheet.pdf