問題描述
我需要在我的 cms 頁面中調(diào)用一個 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 基本上是打開一個表單,但這并不重要.此代碼不會顯示超出標(biāo)題的任何內(nèi)容.
fom-top.phtml basically opens a form but that does not matter. this code cause nothing past the header to be displayed.
關(guān)于如何在 CMS 頁面中調(diào)用 phtml 文件的任何想法?
any ideas on how to call a phtml file within a CMS page?
推薦答案
查看網(wǎng)頁源代碼并滾動到底部以查看 php 錯誤.
View the source of your webpage and scroll to the bottom to see a php error.
form-top.phtml 被調(diào)用,但里面有一個 php 錯誤,它失敗了.錯誤可能發(fā)生在一個不可見的 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.
這篇關(guān)于如何在 CMS 頁面 Magento 中調(diào)用 PHTML 文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!