7/04/2012

How to call .phtml file in CMS page in magento

To call a phtml file in a cms page or cms static block:

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

If you know, where the block file(php file) for your phtml file resides, then you can use it as type.

Example: Suppose you want to call new.phtml file that resides in catalog/product folder, and you know that its corresponding Block file(php file) resides in Catalog/Product folder, then you can use:

{{block type="catalog/product" template="catalog/product/new.phtml"}}

No comments:

Post a Comment