How do I find out the content type within template.php? I'm using THEME_page_alter to give my site a meta description, and is working fine.
However I can't find the variable which defines the content type - I need to use it as an argument to give different pages different descriptions. I tried $node->type

Side question: where on earth can I find answers for such simple tasks like this without having to ask in DA? I did a lot of Googling and looking in the API, and looking at the Globals list... but it seems like the official Drupal documentation doesn't make things easy for you in some respects.

Thanks
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