草庐IT

getTemplateFile

全部标签

php - 为什么我对 Magento Block 的 getTemplateFile 方法的调用返回 null?

当我在索引Controller中使用以下代码时setTemplate('helloworld.phtml');var_dump($block->getTemplateFile());}}我期待这样的结果string'frontend/base/default/template/helloworld.phtml'(length=47)但是,在我的系统上,我得到null我的系统有什么问题,它返回null来调用getTemplateFile或我该如何自行调试?发生在Magento1.7.0.1上。 最佳答案 作为Vinai在他的origi