Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我的自定义管理模块的URL错误_Php_Magento - Fatal编程技术网

Php 我的自定义管理模块的URL错误

Php 我的自定义管理模块的URL错误,php,magento,Php,Magento,我已经在Magento管理面板中创建了一个带有网格的自定义模块,它工作得非常好。我怀疑的是网址。对于默认的Magento模块,我得到的URL为: magento_source/index.php/admin/cms_page/index/key/8b14fb90d8d50c24c0da008db9fd1672/ 但对于我的自定义模块,我得到以下url: magento_source/index.php/demo/adminhtml_demo/index/key/fc732c9223b88a80

我已经在Magento管理面板中创建了一个带有网格的自定义模块,它工作得非常好。我怀疑的是网址。对于默认的Magento模块,我得到的URL为:

magento_source/index.php/admin/cms_page/index/key/8b14fb90d8d50c24c0da008db9fd1672/
但对于我的自定义模块,我得到以下url:

magento_source/index.php/demo/adminhtml_demo/index/key/fc732c9223b88a80ca1b17b2a0f12c95/
而不是

magento_source/index.php/admin/adminhtml_demo/index/key/8b14fb90d8d50c24c0da008db9fd1672/
我能做些什么来解决这个问题

My config.xml文件:

<?xml version="1.0"?>
   <config>    
    <modules>
    <Blazedream_Demo>
        <version>1.6.2.0.4</version>
    </Blazedream_Demo>
  </modules>
 <frontend> 
    <routers> 
        <demo> 
            <use>standard</use> 
            <args> 
                <module>Blazedream_Demo</module> 
                 <frontName>demo</frontName> 
            </args> 
        </demo> 
    </routers> 
    <layout>
        <updates>
            <demo>
                 <file>demo.xml</file>
             </demo>
         </updates>
     </layout>
 </frontend>
  <admin>
     <routers>
         <demo>
         <use>admin</use>
         <args>
            <module>Blazedream_Demo</module>
            <frontName>demo</frontName>

        </args>
        </demo>
    </routers>
</admin>

<adminhtml>
<menu>
    <demo module="demo">
        <title>Demo</title>
        <sort_order>71</sort_order>
        <children>
            <items module="demo">
                <title>Manage Items</title>
                <sort_order>0</sort_order>
                <action>demo/adminhtml_demo</action>
            </items>
        </children>
    </demo>
</menu>
<acl>
    <resources>
        <all>
        <title>Allow Everything</title>
        </all>
        <admin>
            <children>
                <demo>
                    <title>Demo Module</title>
                    <sort_order>200</sort_order>
                </demo>
            </children>
        </admin>
    </resources>
</acl>
<layout>
    <updates>
        <demo>
            <file>demo.xml</file>
        </demo>
    </updates>
</layout>
</adminhtml> 
<global>
    <models>
        <demo>
            <class>Blazedream_Demo_Model</class>
            <resourceModel>demo_mysql4</resourceModel>
        </demo>
        <demo_mysql4>
            <class>Blazedream_Demo_Model_Mysql4</class>
                <entities>
                    <demo>
                        <table>demo</table>
                    </demo>
                </entities>
        </demo_mysql4>
    </models>
    <events> 
     <demo_save_before>
        <observers>
            <blazedream_demo_save_observer>
               <type>singleton</type>
               <class>demo/observer</class>
               <method>demo_save_before</method>
            </blazedream_demo_save_observer>
        </observers>
    </demo_save_before>
    </events> 
    <resources>
        <demo_setup>
            <setup>
                <module>Blazedream_Demo</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </demo_setup>
        <demo_write>
            <connection>
                <use>core_write</use>
            </connection>
        </demo_write>
        <demo_read>
            <connection>
                <use>core_read</use>
            </connection>
        </demo_read>
    </resources>
    <blocks>
        <demo>
            <class>Blazedream_Demo_Block</class>
        </demo>
    </blocks>
    <helpers>
        <demo>
            <class>Blazedream_Demo_Helper</class>
        </demo>
    </helpers>
 </global>   
 </config>
有人能帮我吗?
提前感谢。

如果您使用类似以下代码的管理路由器,它将生成您想要的url。此代码是获取默认管理路由器

<admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <Simbeez_Ponochange before="Mage_Adminhtml">Simbeez_Ponochange_Adminhtml</Simbeez_Ponochange>
                    </modules>
                </args>
            </adminhtml>
        </routers>
</admin>

你能在这里添加你的config.xml代码吗?我已经添加了我的config.xml文件,你能告诉我我应该做什么更改吗?现在你的路由器按照你的意愿配置,现在不需要使用demo/。。