Okay, that’s why Ive created static blocks in my CMS area and Im trying to output them inside Ive’s custom homepage template.
Each document I can find says to output a block as follows
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('my-block-identifier')->toHtml() ?>
This did not work for me, so I tried a different way. -
<?php $block = Mage::getSingleton('core/layout')->createBlock('cms/block')->setBlockId('my-block-identifier');
echo $block->toHtml();
All sites linking to this tell me to use the actual block id to get the block. So, I decided to manually find the block_id in my cms_block table and see if it works with the block_id number instead of the literal name my-block-identifier, and he did it. So I'm confused ... Can someone tell me how I can get the block by actual identifier or look for the block identifier by identifier so that I can capture the block by block name?
Any help is greatly appreciated.
source
share