【问题标题】:Magento admin menu link not showing upMagento 管理菜单链接未显示
【发布时间】:2012-07-30 18:29:29
【问题描述】:

我在 Magento 中创建了 2 个模块(A 和 B)。这些模块中的每一个都由管理部分管理。

我尝试通过在模块的配置文件中编写以下配置,在管理部分的 cms(menu) 下为每个模块创建一个菜单链接

模块 A>etc>config.xml

<adminhtml>
        <menu>
        <a module="A">
                <title>A</title>
                <sort_order>100</sort_order>               
                <children>
                    <items module="A">
                        <title>Manage A</title>
                        <sort_order>0</sort_order>
                          <action>a/adminhtml_a</action>
                    </items>
                </children>
            </a>
        </menu>
  <adminhtml>

模块 B>etc>config.xml

<adminhtml>
        <menu>
        <b module="B">
                <title>B</title>
                <sort_order>100</sort_order>               
                <children>
                    <items module="B">
                        <title>Manage B</title>
                        <sort_order>1</sort_order>
                          <action>b/adminhtml_b</action>
                    </items>
                </children>
            </b>
        </menu>
  <adminhtml>

但是,只有模块 B 的链接显示在 CMS 菜单下。如何显示两个链接?

【问题讨论】:

    标签: magento


    【解决方案1】:

    以下工作 模块 A>etc>config.xml

     <menu>
                    <cms>
                        <children>
                        <a module="A">
                            <title>A</title>
                            <sort_order>5</sort_order>               
                            <children>
                                <items module="A">
                                    <title>Manage A</title>
                                    <sort_order>0</sort_order>
                                    <action>A/adminhtml_a</action>
                                </items>
                            </children>
                        </a>
                        </children>
                        </cms>
    
    
                </menu>
    

    模块 B>etc>config.xml

    <menu>
                    <cms>
                        <children>
                        <b module="B">
                            <title>B</title>
                            <sort_order>6</sort_order>               
                            <children>
                                <items module="B">
                                    <title>Manage B</title>
                                    <sort_order>0</sort_order>
                                    <action>B/adminhtml_b</action>
                                </items>
                            </children>
                        </b>
                        </children>
                        </cms>
    
    
                </menu>
    

    【讨论】:

    • 您好,我使用的是 Magento 1.9.2.2,在管理面板中,菜单项“移动”没有出现,您能帮帮我吗?
    猜你喜欢
    • 2013-10-06
    • 2014-10-07
    • 1970-01-01
    • 1970-01-01
    • 2014-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-10
    相关资源
    最近更新 更多