XML
<block type= "cms/block" name= "your_block_id" > <action method= "setBlockId" ><block_id>your_block_id</block_id></action> </block> |
PHTML
SOLUTION 1: <?php echo $this ->getLayout()->createBlock( 'cms/block' )->setBlockId( 'my-new-block' )->toHtml() ?> SOLUTION 2: <?php echo $this ->getChildHtml( 'xxxxxx' ) ?> SOLUTION 3: <?php echo $this ->getBlockHtml( 'store_language' ); ?> SOLUTION 4: $staticBlock = Mage::getModel( 'cms/block' )->load( 'block-id' ); echo $staticBlock ->getTitle(); //display the title of your block echo $staticBlock ->getContent(); //display the content of your block /* Fetching CMS Blocks using PHP <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('contacts_text')->toHtml();?> Fetching Template Blocks using PHP <?php echo $this->getLayout()->createBlock('catalog/product_list_related')->setTemplate('catalog/product/list/related.phtml')->toHtml();?> */ |
SHORTCODE / CMS PAGE
{{block type= "cms/block" block_id= "your_block_id" }} |