Last Updated: February 25, 2016
·
981
· dubrod

Accessing a Magento Static Block From a .phtml Template File

<?php
// Retrieve the layout object
$layout = Mage::getSingleton('core/layout');

// Generate a CMS block object
$block = $layout->createBlock('cms/block');

// Set the block ID of the static block
$block->setBlockId('block-id-in-magento');

// Write the static block content to screen
echo $block->toHtml();
?>