Retrieve current product, category and CMS page Magento Registry

Sunday, 13. November 2011

Here are the quick snippet scripts for pulling out the current product, category and cms page from inside script or template files in Magento.

Get Current category

$_category = Mage::registry('current_category');

Get Current Product

$_product = Mage::registry('current_product');

Get Gurrent CMS Page

$_cmspage = Mage::registry('cms_page')


Leave a Reply

You must be logged in to post a comment.