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();
Clive Walkden
Posted:
Latest Articles
Linux —
How to Install NordLayer VPN Client on Ubuntu 20.04 and Connect to a Virtual NetworkA simple to follow installation guide for NordLayer VPN
Author
MySQL —
Mastering MySQL Database Imports on LinuxLearn efficient ways to import MySQL databases on Linux using the mysql command-line client. Explore the --source option and < operator for seamless data migration. Master MySQL imports on Linux with our comprehensive guide.
Author
DevOps —
Mastering SSH Key Conversions for DevOpsA guide to convert SSH keys from one version to another using Linux CLI
Author