Add Static Block content in template

Written by Mark Clark - Thu Jun 18, 07:37 pm ET

Normally you would need to add some lines of code in the XML layout files to be able to include a static block from the CMS-system in the Magento Backend, but using this code in the template will automatically fetch the content from the static block:


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

No related posts.

  • Share: