Search This Blog

Mind freaker Stuff

Please Visit my new blog http://www.mindfreakerstuff.com for new articles related to web and mobile designing.

Wednesday, May 11, 2011

Display Static Block With Title : Magento

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('identifier')->toHtml() ?>


By calling the static block model, you can then get all fields associated with that block such as the  
static block title

<?php
$block = Mage::getModel('cms/block')->load('identifier');
echo $block->getTitle();
echo $block->getContent();
?>

No comments:

Post a Comment