Wednesday, January 25, 2012

Get Current Category : Magento(Category Data)

// get current category from Mage:registry
$currentcategory = Mage::registry('current_category');

// general category data
echo $currentcategory->getName();
echo $currentcategory->getId();
echo $currentcategory->getImageUrl();
echo $currentcategory->getUrl();

2 comments: