title: Magento new custom block module
body: <p>I'm using Magento version <strong>1.8.1.0.</strong> </p>
  
  <p>I'm trying to create a new custom block module, which I'll use for creating a new home page.</p>
  
  <ul>
  <li>Namespace: Crusader</li>
  <li>Module: CLHomePage</li>
  <li>Block Type: crusaderhome</li>
  <li>Class: Qwerty (just for now while testing)</li>
  <li>Design Package: crusader</li>
  <li>Theme: default</li>
  </ul>
  
  <p>This is what I have so far:</p>
  
  <p>\app\etc\modules\Crusader_All.xml</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config&gt;
      &lt;modules&gt;
          &lt;Crusader_CLHomePage&gt;
              &lt;active&gt;true&lt;/active&gt;
              &lt;codePool&gt;local&lt;/codePool&gt;
          &lt;/Crusader_CLHomePage&gt;
      &lt;/modules&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>\app\code\local\Crusader\CLHomePage\etc\config.xml</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config&gt; 
      &lt;modules&gt;
          &lt;Crusader_CLHomePage&gt;
              &lt;version&gt;0.0.1&lt;/version&gt;
          &lt;/Crusader_CLHomePage&gt;
      &lt;/modules&gt;
      &lt;global&gt;
          &lt;blocks&gt;
              &lt;crusaderhome&gt;
                  &lt;class&gt;Crusader_CLHomePage_Block&lt;/class&gt;
              &lt;/crusaderhome&gt;
          &lt;/blocks&gt;
      &lt;/global&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>\app\code\local\Crusader\CLHomePage\Block\Qwerty.php</p>
  
  <pre><code>&lt;?php
  class Crusader_CLHomePage_Block_Qwerty extends Mage_Core_Block_Template
  {
      // Methods (optional)
  }
  ?&gt;
  </code></pre>
  
  <p>\app\design\frontend\crusader\default\layout\local.xml</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;layout&gt;
      &lt;cms_index_index&gt;
          &lt;reference name="content"&gt;
              &lt;block type="core/template" name="homepage" template="crusader/home.phtml"&gt;
                  &lt;block type="crusaderhome/qwerty" name="homeads" as="homeads" template="crusader/homeads.phtml" /&gt;
              &lt;/block&gt;
          &lt;/reference&gt;
      &lt;/cms_index_index&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <p>\app\design\frontend\crusader\default\template\crusader\home.phtml</p>
  
  <pre><code>&lt;div id="home"&gt;
  &lt;p&gt;Home Wrapper&lt;/p&gt;
  &lt;?php echo $this-&gt;getChildHtml('homeads'); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>\app\design\frontend\crusader\default\template\crusader\homeads.phtml</p>
  
  <pre><code>&lt;p&gt;Adverts&lt;/p&gt;
  </code></pre>
  
  <p>Now, with the above in place, my home page shows just "Home Wrapper", so the content of <code>home.phtml</code> is displayed, but not the content of <code>homeads.phtml</code>.</p>
  
  <p>If I change the block type for <code>homeads</code> to <code>core/template</code>, it works, and I see both "Home Wrapper" and "Adverts". So I know the problem is something to do with the reference to my new block type (called crusaderhome).</p>
  
  <p>What am I doing wrong here..?</p>