Magento etc下面的config.xml adminhtml.xml 配置信息

在config.xml的配置信息里面可以配置adminhtml信息。例如下面操作

D:\www\lollicupStore2\app\code\local\TonyTemplate\Blog\etc\config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <TonyTemplate_Blog>
            <version>0.1.0</version>
        </TonyTemplate_Blog>
    </modules>
    <adminhtml>
        <menu>
            <blog module="blog">
                <title>Blog</title>
                <sort_order>710</sort_order>
                <children>
                    <items module="blog">
                        <title>Manage Items</title>
                        <sort_order>0</sort_order>
                        <action>blog/adminhtml_blog</action>
                    </items>
                    <comments module="blog">
                        <title>Comments</title>
                        <sort_order>1</sort_order>
                        <action>adminhtml_comment</action>
                    </comments>
                </children>
            </blog>
        </menu>
    </adminhtml>
</config>

在上面config.xml文件中adminhtml的配置信息,可以放在D:\www\lollicupStore2\app\code\local\TonyTemplate\Blog\etc\adminhtml.xml 里面。

<?xml version="1.0"?>
<config>
    <menu>
        <blog module="blog">
            <title>Blog1111</title>
            <sort_order>710</sort_order>
            <children>
                <items module="blog">
                    <title>Manage Items</title>
                    <sort_order>0</sort_order>
                    <action>blog/adminhtml_blog</action>
                </items>
                <comments module="blog">
                    <title>Comments</title>
                    <sort_order>1</sort_order>
                    <action>adminhtml_comment</action>
                </comments>
            </children>
        </blog>
    </menu>
</config>

一般情况,config.xml里面不配置adminhtml.xml信息。adminhtml.xml的配置文件信息单独写adminhtml.xml

Leave a Reply

您的邮箱地址不会被公开。 必填项已用 * 标注