Clive Walkden

PHP, MySQL, HTML5, CSS3, jQuery code and ideas.

Magento

Check if a static block is enabled in Magento

Check if a static block is enabled in Magento

in Magento
by
with 0 Comments

I've only been using Magento for a short period and I've noticed that it is extremely powerful, yet very flexible. This little snippet of code has helped me no end in my projects.

If you wish to check if a static block is enabled or disabled in your phtml files then simply use this bit of code with the identifier of your static block in place of static-block-identifier.

Mage::getModel('cms/block')->load('static-block-identifier')->getIsActive();
comments powered by Disqus