title: Magento: How to tell if you're on a category page, or product page in .phtml file(s)
body: <p>I am trying to program into my .phtml files an if statement if the guest is on a category list page, or on a product page.</p>
  
  <p>For example this code: </p>
  
  <pre><code>&lt;?= Mage::app()-&gt;getFrontController()-&gt;getRequest()-&gt;getRouteName(); ?&gt;
  </code></pre>
  
  <p>Returns "catalog" whenever l'm on a page other than a CMS page. </p>
  
  <p>Is there a way l can use a similar method to know if the user is looking at a root category, sub category or an individual product page? </p>
  
  <p>Any help would be greatly appreciated!</p>