Skip to content Skip to sidebar Skip to footer

Magento get current category details

Reading Time: < 1 minute

Sometimes when you are customizing your Magento files that you want to get current category ID or name. Here ,easy method to get current category ID or name in Magento.This will direct return category ID or name.

  // get category name
  echo Mage::getModel('catalog/layer')->getCurrentCategory()->getName();