Previous Article

Check if a static block is enabled in Magento

Next Article

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();
Avatar of Clive Walkden

Clive Walkden

Posted:

Latest Articles

Linux command line tools, installations etc

Linux

How to Install NordLayer VPN Client on Ubuntu 20.04 and Connect to a Virtual Network

A simple to follow installation guide for NordLayer VPN

MySQL usage, tweaks and learnings

MySQL

Mastering MySQL Database Imports on Linux

Learn 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.

DevOps principles and tool usage

DevOps

Mastering SSH Key Conversions for DevOps

A guide to convert SSH keys from one version to another using Linux CLI