Magento static block

23.Dec.2010

Have you ever wondered how to display Magento static block inside your app/store? It is an easy task, so just use following snippet. First, you have to create your static block in Magento admin, and than use its name to load it in your web application.

1
2
$block = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load("Magento_static_block_name");
echo $block;