如何在CMS页面Magento中调用PHTML文件 [英] how to call a PHTML file within a CMS page Magento
问题描述
我需要在cms页面中调用一个phtml文件,它将无法正常工作.
I need to call a phtml file within my cms page and it will not work.
这是cms页面中的代码
this is the code in the cms page
{{block type="core/template" template="catalog/product/form-top.phtml"}}
fom-top.phtml基本上会打开一个表单,但这并不重要.此代码不会显示任何超出标题的内容.
fom-top.phtml basically opens a form but that does not matter. this code cause nothing past the header to be displayed.
关于如何在CMS页面中调用phtml文件的任何想法?
any ideas on how to call a phtml file within a CMS page?
推荐答案
查看网页的源代码并滚动到底部以查看php错误.
View the source of your webpage and scroll to the bottom to see a php error.
form-top.phtml被调用,但是里面有一个php错误,失败了.该错误可能发生在不可见的div中,这就是为什么您无法正常看到它的原因.
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.
这篇关于如何在CMS页面Magento中调用PHTML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!