菜单未在Magento Admin中显示

时间:2013-05-16 06:17:45

标签: magento menu admin

我想在magento仪表板中为具有用户添加/编辑/删除功能的特定用户类型添加一个部分,因此我为magento Admin创建了一个模块,但它没有在管理菜单中显示。 我想在magento admin中显示关联菜单。

虽然它在系统中显示 - > config - >提前启用/禁用设施。 配置xml是。                                                       0.1.0                      

    <global>
        <models>
            <association>
                <class>yanga_association_Model</class>
                <resourceModel>association_mysql4</resourceModel>
            </association>
            <association_mysql4>
                <class>yanga_association_Model_Mysql4</class>
                <entities>
                    <association>
                        <table>association</table>
                    </association>
                </entities>
            </association_mysql4>
        </models>
        <resources>
            <association_setup>
                <setup>
                    <module>yanga_association</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </association_setup>
            <association_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </association_write>
            <association_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </association_read>
        </resources>
        <blocks>
            <association>
                <class>yanga_association_Block</class>
            </association>
        </blocks>
        <helpers>
            <association>
                <class>yanga_association_Helper</class>
            </association>
        </helpers>
    </global>
     <admin>
        <routers>
            <association>
                <use>admin</use>
                <args>
                    <module>Yanga_Association</module>
                    <frontName>association</frontName>
                </args>
            </association>
        </routers>
    </admin>
    <adminhtml>
    <menu>
        <association module="association">
            <title>Association</title>
            <sort_order>71</sort_order>              
            <children>
                <items module="association">
                    <title>Manage Association</title>
                    <sort_order>0</sort_order>
                       <action>association/adminhtml_association</action>
                </items>

            </children>
        </association>
    </menu>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <Association>
                                        <title>Association Module</title>
                                        <sort_order>10</sort_order>
                                    </Association>
                                </children>
                             </config>
                         </children>
                    </system>
                    <Yanga_Association>
                        <title>System Configuration Tab</title>
                        <sort_order>10</sort_order>
                    </yanga_Association>
                </children>
            </admin>
        </resources>
    </acl>
    <layout>
        <updates>
            <association>
                <file>association.xml</file>
            </association>
        </updates>
    </layout>
</adminhtml>

如果有,请提供解决方案。 提前谢谢。

2 个答案:

答案 0 :(得分:0)

如果您尝试访问系统设置而不是像

那样编码
<config translate="title">
                        <title>Configuration</title>
                        <sort_order>1</sort_order>
                        <action>adminhtml/system_config/edit/section/association</action>
                    </config>

而不是。用这个代码替换。并检查它。它有效吗

答案 1 :(得分:0)

您忘记在自己的acl声明中添加菜单权限,您的ACL应如下所示:

<acl>
    <resources>
        <all>
            <title>Allow Everything</title>
        </all>
        <admin>
            <children>
                <system>
                    <children>
                        <config>
                            <children>
                                <Association>
                                    <title>Association Module</title>
                                    <sort_order>10</sort_order>
                                </Association>
                            </children>
                         </config>
                     </children>
                </system>
                <association>
                   <title>Association</title>
                   <children>
                          <items translate="title" module="association">
                              <title>Manage Association</title>
                          </items>
                   </children>
                </association>
                <Yanga_Association>
                    <title>System Configuration Tab</title>
                    <sort_order>10</sort_order>
                </yanga_Association>
            </children>
        </admin>
    </resources>
</acl>`

希望它有所帮助!

干杯 小号