title: Display a specific subcategory product using PHTML
body: <p>what should be the code in phtml file to show one specific subcategory product on home page ?</p>
  
  <p>I have created a file in catalog/product/topSection.phtml with following code-</p>
  
  <pre><code>             &lt;?php
  
                  $cat_id = 42;
                  $category = Mage::getModel('catalog/category')-&gt;load($cat_id);
                  $products = $category-&gt;getProductCollection();
                  echo 'total- '.$products-&gt;count();
                  foreach($products as $product){ ?&gt;
  
  
                  &lt;h3&gt;
                    &lt;img src="&lt;?php echo $product-&gt;getImageUrl() ?&gt;" alt=""&gt;
                    &lt;p&gt;&lt;?php echo $product-&gt;getName()  ?&gt;&lt;/p&gt;
                  &lt;/h3&gt;
  
              &lt;?php }?&gt;
  </code></pre>
  
  <p>and used  </p>
  
  <blockquote>
    <p>{{block type="core/template" name="top.section.home" template="catalog/product/topSection.phtml"}}       </p>
  </blockquote>
  
  <p>in home page content. but nothing is displaying. what is wrong in my code.</p>