title: how to get category list according to store_id in magento
body: <p>I am trying to get a list of category according to store_id , but all my tries have failed</p>
  
  <p>ive tried</p>
  
  <pre><code>$categories = Mage::getModel('catalog/category')
                  -&gt;getCollection()
                  -&gt;setStoreId(21)
                  -&gt;addAttributeToSelect('*');
  </code></pre>
  
  <p>but it gives me all the categories from all the stores, i have tried</p>
  
  <pre><code>-&gt;addFieldToFilter('store_id', '21')
  </code></pre>
  
  <p>and
      ->addStoreFilter(21)</p>
  
  <p>but with no luck , any help or suggestions will be greatly appreciated, thanking you in advance</p>