Magento code for static block, phtml file call

Code for call phtml file into another phtml file---

<?php echo $this->getLayout()->createBlock('core/template')->setTemplate('catalog/category/test.phtml')->toHtml(); ?>

Code for call static block into phtml file---

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

Call static block to cms home page---

{{block type="cms/block" block_id="home-banner"}}


Call phtml file into static block---

{{block type="core/template" template="demo/test.phtml"}}

Labels: