16

I need to call a phtml file within my cms page and it will not work.

this is the code in the cms page

{{block type="core/template" template="catalog/product/form-top.phtml"}}

fom-top.phtml basically opens a form but that does not matter. this code cause nothing past the header to be displayed.

any ideas on how to call a phtml file within a CMS page?

molleman
  • 2,934
  • 16
  • 61
  • 92

2 Answers2

7

View the source of your webpage and scroll to the bottom to see a php error.

form-top.phtml gets called but there is a php error inside which fails. The error might happen in an invisible div that's why you don't see it the normal way.

balrok
  • 444
  • 3
  • 8
1

Replace your line with following code

{{block class="Magento\Framework\View\Element\Template" template="catalog/product/form-top.phtml"}}