You can call static blocks by using following ways:
1) In CMS page or block:
{{block type="cms/block" block_id="custom_block_id"}}
2) In PHP code:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('custom_block_id')->toHtml(); ?>
3) In XML file:
<block type="cms/block" name="custom_block_id" after="-">
<action method="setBlockId"><block_id>custom_block_id</block_id></action>
</block>
1) In CMS page or block:
{{block type="cms/block" block_id="custom_block_id"}}
2) In PHP code:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('custom_block_id')->toHtml(); ?>
3) In XML file:
<block type="cms/block" name="custom_block_id" after="-">
<action method="setBlockId"><block_id>custom_block_id</block_id></action>
</block>
No comments:
Post a Comment