Get attributes from a static block in phtml : Magento

Get attributes from a static block in phtml : Magento

May 17, 2012 Static block is very useful in magento to make the site functional. When we create the static block it ask for some attributes like title, identifier, statuc and content. We know How to add static block to your phtml file. Now here is the solution to get other attributes in phtml file. Static Block For example we have a static block which identifier is "myidentity". Now using the belwo code we can get the attaributes from that static block. $block = Mage::getModel('cms/block') ->setStoreId(Mage::app()->getStore()->getId())->load('myidentity'); echo $title = $block->getTitle(); echo $isActive = $block->getIsActive(); Hope it will help you. You can use it in your way. Cheers :)

Related Posts

from my blog

How To Reset Admin Password in Magento

January 20, 2017

As an ecommerce website developer or magento website developer, sometime we  get the a situation when we forget the magento website admin access detail. To reset the password of any...

How to show all attribute after layered navigation filter in Magento

April 10, 2015

Magento Layered Navigation is really good for filter the product but problem is that, if we select any attribute like color or price all other attribute hide which are not...

How to fix layered navigation filer URL in Magento?

April 2, 2015

Magento is really good eCommerce CMS in terms of functionality. Layered Navigation is really good feature of Magento to filter the product in frontend side. Only problem with the layered navigation filter...