/ Magento

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

Latest Articles

Linux command line tools, installations etc

Linux

Terraform Installation

A quick installation guide for Terraform on Ubuntu 18.04

Bitcoin - Cryptocurrency not just for geeks

Bitcoin

RollerCoin Intro

An introduction to the RollerCoin site and how you can use it to mine your own coins

Magento 2 Blog Posts

Magento 2

Magento 2.4.x Writing to a Log File

How to log to information to a file in different Magento 2.4.x versions