I created 2 static blocks called "message". i want to show one on each store i have. After configuring it correctly im facing an error when i call


since it seems not to be calling the correct message block in the store but always the same one. Is there any way to specify the store_id while checking if block is active?

If i dont check if it is active and only show the block with

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('message')->toHtml();?>

i get the correct content in each store.

1 Answer 1


Do this:

$storeId = 1;
$block = Mage::getModel('cms/block')

$isActive = $block->getIsActive();

To get the current store id replace $storeId = 1 from above with

$storeId = Mage::app()->getStore()->getId();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.