title: Magento createBlock method not working, displaying static block data
body: <p>Ok so Ive created static blocks in my CMS area, and Im trying to output them inside of a custom homepage template Ive built.</p>
  
  <p>Every document I can find says to output the block as follows</p>
  
  <pre><code>    &lt;?php echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId('my-block-identifier')-&gt;toHtml() ?&gt;
  </code></pre>
  
  <p>That didnt work for me, so then I tried another way. -- </p>
  
  <pre><code>       &lt;?php $block = Mage::getSingleton('core/layout')-&gt;createBlock('cms/block')-&gt;setBlockId('my-block-identifier');
          echo $block-&gt;toHtml();
  </code></pre>
  
  <p>All the sites referencing this tell me to use the actual blocks identifier to get the block. So then I decide to manually lookup the block_id in my cms_block table and see if using the block_id number in place of the literal my-block-identifier name will work - and it did. So I am confused... Can anyone tell me how I can get the block by the actual identifier, or look up the blocks id by the identifier so that I can grab the block by block name?</p>
  
  <p>Any help much appreciated.</p>