Get current category ID on category page in magento

Get current category ID and name on category page in magento.

We used this code :

<?php echo Mage::getModel(‘catalog/layer’)->getCurrentCategory()->getName(); ?>
<?php echo Mage::getModel(‘catalog/layer’)->getCurrentCategory()->getId(); ?>

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *