title: How to get catalog product data in Magento 1.8?
body: <p>I use these lines below to get the CMS page data,</p>
  
  <pre><code>// Get current cms page from Mage:getSingleton
  $cms_id = Mage::getSingleton('cms/page')-&gt;getIdentifier();
  $cms_title = Mage::getSingleton('cms/page')-&gt;getTitle();
  $cms_content = Mage::getSingleton('cms/page')-&gt;getContent();
  var_dump($cms_content);
  </code></pre>
  
  <p>What about if I want to get a catalog product data? I want to get the product's name for instance,</p>
  
  <pre><code>$_helper = $this-&gt;helper('catalog/output');
  $product_id = Mage::getSingleton('catalog/product')-&gt;getIdentifier();
  $product = Mage::getModel('catalog/product')-&gt;load($product_id);
  echo $_helper-&gt;productAttribute($_product, $_product-&gt;getName(), 'name');
  </code></pre>
  
  <p>result,</p>
  
  <blockquote>
    <p>Fatal error: Call to a member function getName() on a non-object in
    C:\wamp\www\mywebiste.com\app\design\frontend\mywebsite\default\template\page\html\banner.phtml
    on line 6</p>
  </blockquote>
  
  <p>Any ideas?</p>