Magento : Get specific category level

You can get specific Category level in magento.

Please find the sample code below:

// Start of the code

$categoryId = ’10’;
$categoryObj = Mage::getModel(‘catalog/category’)->load($categoryId);
$categoryLevel = $categoryObj->getLevel();

//End of the Code

Leave a Reply