title: Get name and image from a list of sub categories in Magento
body: <p>I am trying to get all subcategories of a Magento category and display their name and image.</p>
  
  <p>So far I have:</p>
  
  <pre><code>$children = Mage::getModel('catalog/category')-&gt;getCategories(28);
  
  foreach ($children as $category) {
      echo "name: " . $category-&gt;getName() . "&lt;br&gt;"; 
      echo "image: " . $category-&gt;getImageUrl() . "&lt;br&gt;"; 
  }
  </code></pre>
  
  <p><code>$category-&gt;getName()</code> works, but <code>$category-&gt;getImageUrl()</code> doesn't seem to.</p>
  
  <p>I am following the <a href="http://docs.magentocommerce.com/" rel="nofollow">Magento docs</a> reference of the catalog / category model (see Mage:Catalog along the top then Mage_Catalog_Model_Category at the side).</p>
  
  <p>It clearly states that <code>string getImageUrl ()</code> is an available method of the class, however I obviously can't call it.</p>
  
  <p>I'd like to know why in the above this method isn't available, and also more generally, why a lot of methods don't seem to be available from a class so I can understand how to solve these recurring problems in the future.</p>
  
  <p>So, my question is, what does the above need to make the <code>getImageUrl</code> method available, and, generally how can I identify what needs adding to make other methods that are in the docs but unavailable by 'default' in the Magento framework?</p>
  
  <p>Any help would be very much appreciated. Thanks.</p>