How to get the current category/product/cms page

0 votes
384 views
asked Jun 22, 2016 in Magento by Daisy Dee
How do we get the current category/product/cms page in Magento?

1 Answer

0 votes
answered Jul 8, 2016 by Liam Jackson
Hey Shoot this...

<?php
$currentCategory = Mage::registry('current_category');
$currentProduct = Mage::registry('current_product');
$currentCmsPage = Mage::registry('cms_page');
?>

Related questions

0 votes
1 answer 446 views
asked Jun 29, 2016 in Magento by Akshay Raj
+1 vote
1 answer 589 views
0 votes
2 answers 394 views
0 votes
1 answer 547 views
0 votes
1 answer 347 views
asked Jun 13, 2016 in Magento by Don
0 votes
1 answer 403 views
...