Magento – Check if CMS Static Block is Enabled / Active

Static blocks in Magento are really useful. They offer an easy way to insert content into various parts of the template. You are only limited by your imagination. You can check if the static blocks are enabled, before printing them to screen.

if(Mage::getModel(‘cms/block’)->load(‘static-block-identifier’)->getIsActive()) :

echo Mage::app()->getLayout()->createBlock(‘cms/block’)->setBlockId(‘static-block-identifier’)->toHtml();