title: Magento - Block is not rendered
body: <p>I'm developing my second Magento module, which should retrieve some data and render a block containing it. Such block would then be used by other pages.</p>
  
  <p>At the moment, I have almost the whole module in place, but, for some reason, the block is not rendered when I call the controller method. I put some debug information, and I could see that the block's <code>__construct()</code> method is called correctly, but then the template doesn't seem to be loaded and the returned page is blank.</p>
  
  <p>Here's the code for the block, which I copied from another module and modified:</p>
  
  <pre><code>class Company_CustomerData_Block_CustomerSummary extends Mage_Core_Block_Template {
      const _TEMPLATE = 'customerdata/customersummary.phtml';
  
      public function __construct() {
      // This method is called correctly
          parent::_construct();
          $this-&gt;setTemplate(self::_TEMPLATE);
      }
  }
  </code></pre>
  
  <p>The file <em>customersummary.phtml</em> is in <em>app/design/frontend/base/default/template/customerdata</em>, which should be the correct place (or, at least, I think it is). Its content is the following:</p>
  
  <pre><code>It works!
  </code></pre>
  
  <p>Just some plain text. No tags, no code, nothing. I don't mind that it's a static text, it will be populated with data once complete.</p>
  
  <p>In case of need, here's the code for the Controller (I removed the parts where the data is retrieved, as they don't make a difference):</p>
  
  <pre><code>public function dashboardAction() {
      // Customer Data to render in the block
      $CustomerData = array(); // Data is retrieved elsewhere
  
      $this-&gt;getResponse()-&gt;setBody(
          $this-&gt;getLayout()-&gt;createBlock('customerdata/customersummary')
          -&gt;toHtml()
      );
  }
  </code></pre>
  
  <p>What could I be doing wrong? I'm afraid I made some stupid mistake again, but I really can't see it.</p>
  
  <p>Finally two more questions:</p>
  
  <ul>
  <li>How do I pass to the template the data I retrieve in the Controller? Specifically, variable <code>$CustomerData</code>.</li>
  <li>Once the block renders, how do I render its content from within a page? The block should return a  with some stuff in it, I'd like to render it inside the Customer Dashboard, just below the information that is already there.</li>
  </ul>
  
  <p>Thanks in advance for the help.</p>