It is sometime really needed to show the custom block or any static block in the PHML file. Generally on the magento websites home page or any other pages uses one column layout and it is needed to show the left of right sidebar blocks like compare products, poll, cart block which are there in one column left or one column right side layouts in the one column layout so here are the examples to show core template files and static blocs in PHMTL and CMS pages.

1) To call the core template file in phtml file in magento

getLayout()->createBlock(‘core/template’)->setTemplate(‘templateFolder/yourtemplate.phtml’)->toHtml(); ?>

2) To call the core template file in CMS page

{{block type=”core/template” template=”templateFolder/your_template.phtml”}}

3) To call a static block in phtml file in magento

getLayout()->createBlock('cms/block')->setBlockId('your_block_id')->toHtml() ?>

4) To call a static block in CMS page

{{block type="cms/block" block_id="your_block_id"}}

Developers can easily display the static block or their custom block in any phtml file or any CMS page through that one line of code.