title: Magento - list sub-categories of a specific parent category as links
body: <p>I am a beginner to php and am stuck on trying to call out sub-categories of just one parent category as links</p>
  
  <p>I got to this and it’s bringing up the getName but the getUrl() isn’t returning any URL at all....</p>
  
  <pre><code>&lt;?php
        $children = Mage::getModel('catalog/category')-&gt;getCategories(3);
        foreach ($children as $category):
              echo '&lt;li&gt;&lt;a href="' . $category-&gt;getUrl() . '"&gt;' . $category-&gt;getName() . '&lt;/a&gt;&lt;/li&gt;';
        endforeach;
  ?&gt;
  </code></pre>
  
  <p>The output code is just <code>&lt;li&gt;&lt;a href=""&gt;name of sub-cat&lt;/a&gt;&lt;/li&gt;</code></p>
  
  <p>Anybody have any ideas? Please? </p>
  
  <p>Thanks,
  Kayla</p>