从Magento Backend开始 [英] starting with Magento Backend

查看:77
本文介绍了从Magento Backend开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天以来,我一直在研究Magento后端的行为.为了理解,我制作了一个新的网格以查看bbdd的表格.完成此网格后,我尝试在CMS页面中添加小部件时可以看到404错误:

Since a couple of days I´m looking at the behaviour of the Magento backend. To comprehend I made a new grid to see a table of the bbdd. After finishing this grid I can see that I have a 404 error when try I to add a widget in a CMS page:

调试中,如果我在自定义模块中对此进行注释,则错误消失了

Debugging I can see that the error disappears if I comment this out of my custom module

<admin>
    <routers>
       <giftrouter>
            <use>admin</use>
            <args>
                <module>Wpr_Giftproducts_Adminhtml</module>
                <frontName>admin</frontName>
                <modules>
                    <sintax after="Wpr_Giftproducts_Adminhtml">Mage_Adminhtml</sintax>
                </modules>
            </args>
       </giftrouter>             

     </routers>     
</admin>

我确实认为该错误是由以下原因引起的:

Concretely I think that the error was caused by this:

<sintax after="Wpr_Giftproducts_Adminhtml">Mage_Adminhtml</sintax>

但是我不明白此配置的工作原理. 如何设置自定义路由以避免与小部件冲突?

But I don´t understand how this config works. How can I set a custom route to avoid conflict with the widget?

推荐答案

我认为您的路由器是反向的.

I think you have your routers in reverse.

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <sintax before="Mage_Adminhtml">Wpr_Giftproducts_Adminhtml</sintax>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

这种方式Giftproducts控制器是adminhtml路由器的一部分,而以前的方法是将管理控制器重新分配给giftrouter.

This way the Giftproducts controller is part of the adminhtml router, whereas the old way was reassigning admin controllers to giftrouter.

这篇关于从Magento Backend开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆