title: Magento 1.9 Show Newest Products in Footer
body: <p>EDIT: It turns out that the solution below was in fact the correct one. It turns out that my vagrant box didn't have php5-gd installed and so magento was failing to do image stuff, but PHP wasn't showing an error to say it wasn't installed. So make sure you install php5-gd :P</p>
  
  <p>Good day!</p>
  
  <p>I'm currently working on a Magento 1.9 based e-commerce website and I'm basically picking it up as I go along. I am currently taking a static design and turing it into a Magento theme.</p>
  
  <p>I'm trying to show images (with links) to the 6 newest products in the store in the footer area of the store, but the tutorials and questions I have found haven't worked for me.</p>
  
  <p>I have basically taken my footer from the static template and pasted it into my themes footer.phtml file. The design calls for the six images to be displayed like this in the html (if that makes sense?)</p>
  
  <pre><code>&lt;div class="medium-6 large-3 columns newlyAdded"&gt;
      &lt;div class="footerHat"&gt;&lt;/div&gt;
      &lt;h3&gt; Newly Added&lt;/h3&gt;
      &lt;div class="row"&gt;
          &lt;ul class="small-block-grid-3"&gt;
              &lt;li&gt;&lt;img src="./images/footer-image-1.jpg" alt="footer image"&gt;&lt;/li&gt;
              &lt;li&gt;&lt;img src="./images/footer-image-2.jpg" alt="footer image"&gt;&lt;/li&gt;
              &lt;li&gt;&lt;img src="./images/footer-image-3.jpg" alt="footer image"&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;p&gt;&lt;/p&gt;
      &lt;div class="row"&gt;
          &lt;ul class="small-block-grid-3"&gt;
              &lt;li&gt;&lt;img src="./images/footer-image-4.jpg" alt="footer image"&gt;&lt;/li&gt;
              &lt;li&gt;&lt;img src="./images/footer-image-5.jpg" alt="footer image"&gt;&lt;/li&gt;
              &lt;li&gt;&lt;img src="./images/footer-image-6.jpg" alt="footer image"&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My initial thought was to stick this into a static block and then loop over some stuff from a model in Magento, but I'm not sure if that is the best way.</p>
  
  <p>Any help would be greatly appreciated, and of course I will provide as much information as I can :)</p>
  
  <p>Thanks</p>
  
  <p><strong>EDIT: Extra Info</strong></p>
  
  <p>footer related stuff in the page.xml file:</p>
  
  <pre><code>&lt;block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml"&gt;
      &lt;block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label"&gt;
          &lt;label&gt;Page Footer&lt;/label&gt;
          &lt;action method="setElementClass"&gt;&lt;value&gt;bottom-container&lt;/value&gt;&lt;/action&gt;
      &lt;/block&gt;
      &lt;block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/&gt;
      &lt;block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/&gt;
  &lt;/block&gt;
  
  &lt;block type="core/text_list" name="before_body_end" as="before_body_end" translate="label"&gt;
      &lt;label&gt;Page Bottom&lt;/label&gt;
      &lt;block type="page/html_cookieNotice" name="global_cookie_notice" as ="global_cookie_notice" template="page/html/cookienotice.phtml" before="-" /&gt;
  &lt;/block&gt;
  
  &lt;reference name="footer"&gt;
      &lt;block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml"&gt;
          &lt;action method="setProductsCount"&gt;&lt;count&gt;4&lt;/count&gt;&lt;/action&gt;
      &lt;/block&gt;
  &lt;/reference&gt;
  </code></pre>
  
  <p>footer.phtml file (default magento version)</p>
  
  <pre><code>&lt;div class="footer-container"&gt;
      &lt;div class="footer"&gt;
          &lt;?php echo $this-&gt;getChildHtml() ?&gt;
          &lt;p class="bugs"&gt;&lt;?php echo $this-&gt;__('Help Us to Keep Magento Healthy') ?&gt; - &lt;a href="http://www.magentocommerce.com/bug-tracking" onclick="this.target='_blank'"&gt;&lt;strong&gt;&lt;?php echo $this-&gt;__('Report All Bugs') ?&gt;&lt;/strong&gt;&lt;/a&gt; &lt;?php echo $this-&gt;__('(ver. %s)', Mage::getVersion()) ?&gt;&lt;/p&gt;
          &lt;address&gt;&lt;?php echo $this-&gt;getCopyright() ?&gt;&lt;/address&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>the custom_page.xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;layout&gt;
      &lt;custom_layout translate="label"&gt;
          &lt;label&gt;Custom layout&lt;/label&gt;
          &lt;reference name="root"&gt;
              &lt;action method="setTemplate"&gt;&lt;template&gt;page/custom_layout.phtml&lt;/template&gt;&lt;/action&gt;
              &lt;action method="setIsHandle"&gt;&lt;applied&gt;1&lt;/applied&gt;&lt;/action&gt;
          &lt;/reference&gt;
      &lt;/custom_layout&gt;
  &lt;/layout&gt;
  </code></pre>