Magento - How to call phtml file in CMS Page

You can call a phtml file in CMS Page or a Static Block in a very simple way using a line of code.

 {{block type="core/template" template="templatename/path/filename.phtml"}}

For example, if you want to call your newproducts.phtml file that resides in catalog -> product folder in your template folder use the below line of code: 

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

Hope this helps to solve someone's problem ! For any other queries please feel free to write us at prashcreations(at)gmail(dot)com

3 comments:

  1. can i use it for related products file?

    ReplyDelete
  2. Great blog. All posts have something to learn. Your work is very good and i appreciate you and hoping for some more informative posts.keep writing
    magento development company in bangalore 

    ReplyDelete