Magento Themes and Magento Extensions

In Magento, How to display static block in phtml file

Share

In Magento, you can easily display the different static blocks in each pages. First you need to create static block, for these just Login into site admin end goto CMS->Static Blocks.

Click Add New Block button and fill the required fields and finally save it. Here you need to note theĀ Identifierthat need to be input in below code to display block in individual pages.

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

Comments are closed.