title: Magento get category id by category name and category parent name
body: <p>I'm able to get category id by using the category name in the snippet below </p>
  
  <pre><code> $category = Mage::getResourceModel('catalog/category_collection')-&gt;addFieldToFilter('name', 'clothing');   
   $cat= $category-&gt;getData();
   $categoryid = $cat[0][entity_id];
  </code></pre>
  
  <p>The problem, however, is if two parent categories have subcategories with the same name, how can I get the category id using the parent name </p>
  
  <p>For instance category Men has subcategory Clothing and category Women also has subcategory Clothing. So using the abve code could return the id for clothing in women or clothing in men. I want to find a way to ensure that I get the subcategory id clothing for men or vice versa.</p>
  
  <p>Any pointers would be deeply appreciated </p>