Magento – Get Category by Name and Parent Category ID

categorycollection;magento-1.8

How can I check category have any child category with specific name ?

$category = Mage::getModel('catalog/category')->load($name, 'name');

but I want sub category from specific parent category.

Best Answer

you can try using category collection

$collection->addAttributeToSelect('*')
              ->addAttributeToFilter('parent_id',$parent_id)
              ->addAttributeToFilter('name', array(
              'like' => '%amit%'
             ));