title: Create a new Block in Magento
body: <p>I asked this question yesterday <a href="https://stackoverflow.com/questions/4366177">Static block on home page in Magento</a>, which answered my question about hooking a cms/block to an existing block (content, in that example).</p>
  
  <p>But now I would like to know how to create my own block.</p>
  
  <p>I have this in my .phtml template:</p>
  
  <pre><code>&lt;?php echo $this-&gt;getChildHtml('home_flash') ?&gt;
  </code></pre>
  
  <p>And this in my cms.xml file</p>
  
  <pre><code>&lt;reference name="home_flash"&gt;
    &lt;block type="cms/block" name="home-page-flash" before="content"&gt;
      &lt;action method="setBlockId"&gt;&lt;block_id&gt;home-page-flash&lt;/block_id&gt;&lt;/action&gt;
    &lt;/block&gt;
  &lt;/reference&gt;
  </code></pre>
  
  <p>But this is not working.</p>
  
  <p>I have also tried to create my own block type, (by copying the breadcrumbs declaration) in the page.xml file:</p>
  
  <pre><code>&lt;block type="page/html_home_block" name="home_block" as="home_block" template="page/template/home_block.phtml"/&gt;
  </code></pre>
  
  <p>That file exists but isn't being rendered.</p>
  
  <p>However when I reference the block like this:</p>
  
  <pre><code>&lt;block type="page/html_breadcrumbs" name="home_block" as="home_block" template="page/template/home_block.phtml"/&gt;
  </code></pre>
  
  <p>It renders my home block template, but the original cms/block is not attached to it.</p>
  
  <p>Hope all the different cases show what is happening and highlight the gap in my knowledge well enough for someone to answer, do I have to "register" my new "home_block" type somewhere?</p>