从magento中的控制器阻止
我试图在/index.php/pincel/payment/error/中显示内容,我有以下文件: Block/Error.php从magento中的控制器阻止,magento,block,Magento,Block,我试图在/index.php/pincel/payment/error/中显示内容,我有以下文件: Block/Error.php etc/config.xml <layout> <updates> <pincel> <file>pincel.xml</file> </pincel> </updat
etc/config.xml
<layout>
<updates>
<pincel>
<file>pincel.xml</file>
</pincel>
</updates>
</layout>
但我得到的是一个没有任何错误的白色布局(日志中都没有)
有什么想法吗?提前感谢看来您还没有提供所有必要的信息和文件
/app/design/frontend/default/default/layout/pincel.xml
他失踪了
<pincel_payment_error>
<reference name="content"> <!-- Place were you want to display your content -->
<block type="pincel/error" name="pincel" template="yourtemplate if necessary" />
</reference>
</pincel_payment_error>
您有吗?看起来您没有提供所有必要的信息和文件
/app/design/frontend/default/default/layout/pincel.xml
他失踪了
<pincel_payment_error>
<reference name="content"> <!-- Place were you want to display your content -->
<block type="pincel/error" name="pincel" template="yourtemplate if necessary" />
</reference>
</pincel_payment_error>
您有吗?您使用的是模板文件(.phtml),pincel.xml的内容是什么?您为pincel设置了路由吗?您好,是的,在我的config.xml上,我有这样一个:
standard PincelStudios_Pincel-Pincel
您是否使用模板文件(.phtml),Pincel.xml的内容是什么?您是否为Pincel设置了路由?您好,是的,在我的config.xml上,我有这样一个命令:标准PincelStudio_Pincel Pincel
+1 renderLayout()将在布局中加载Pincel_payment_错误句柄。你必须确保它是明确定义的。是的,我添加了文件,但仍然是空的。有没有办法直接从控制器添加内容?(只有几个静态文本行)。在这种情况下,您可以在Magento Admin中创建静态块,并在控制器中使用:$this->loadLayout()$这个->\u addContent($this->getLayout()->createBlock('cms/block')->setBlockId(“YOURBLOCKNAME”);$this->renderLayout()+1 renderLayout()将在布局中加载pincel_payment_错误句柄。你必须确保它是明确定义的。是的,我添加了文件,但仍然是空的。有没有办法直接从控制器添加内容?(只有几个静态文本行)。在这种情况下,您可以在Magento Admin中创建静态块,并在控制器中使用:$this->loadLayout()$这个->\u addContent($this->getLayout()->createBlock('cms/block')->setBlockId(“YOURBLOCKNAME”);$this->renderLayout();