【发布时间】:2014-09-18 16:54:19
【问题描述】:
我正在尝试在 /index.php/pincel/payment/error/ 中显示内容,并且我有下一个文件:
块/错误.php
<?php
class PincelStudios_Pincel_Block_Error extends Mage_Core_Block_Template
{
}
?>
etc/config.xml
<layout>
<updates>
<pincel>
<file>pincel.xml</file>
</pincel>
</updates>
</layout>
控制器/PaymentController.php
public function errorAction()
{
$this->loadLayout()->renderLayout();
}
但是我得到了一个没有任何错误的白色布局(在日志中都没有)http://i.stack.imgur.com/vzLkk.png
有什么想法吗?提前致谢
【问题讨论】:
-
你使用的是模板文件(.phtml),pincel.xml的内容是什么?
-
你为 pincel 设置路由了吗?
-
你好,是的,在我的 config.xml 我有这个:
<routers> <pincel> <use>standard</use> <args> <module>PincelStudios_Pincel</module> <frontName>pincel</frontName> </args> </pincel> </routers>