Public snippet   |  Code orientation PHP  |   Tested for Magento version 1.3.2.3 No description given for this code snippet.
<?php 

/*
$this->block_code2call, static block code name - the one added under CMS > Static Blocks
*/

$_block = Mage::getModel('cms/block')
                ->setStoreId(Mage::app()->getStore()->getId())
                ->load($this->getLayout()->createBlock('cms/block')->setBlockId($this->block_code2call)->getBlockId());

?>

<div class="box base-mini">
    <div class="head">
        <h4 class="title"><?php echo $this->__($_block->getTitle()) ?></h4>
    </div>
	<div class="content">
		<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId($this->block_code2call)->toHtml() ?>
	</div>
</div>

Total snippets

158

Who's new

  • Naguripisto
  • Stolenfinche
  • anhreg
  • HamuroGTRx
  • almotaRom
 
Magento Code Snippets by the developers for developers :) | Established & Maintained by Branko Ajzele from ActiveCodeline