如何将Magento管理菜单链接到角色资源

如何将Magento管理菜单链接到角色资源,magento,Magento,情况如下: 我想在Magento后端导航菜单中添加一个菜单。 我通过在app/etc/config.xml中添加以下代码来实现这一点: <adminhtml> <menu> <example translate="title" module="adminhtml"> <title>Inventory</title> <sort_order>110</sort_order>

情况如下:

我想在Magento后端导航菜单中添加一个菜单。
我通过在
app/etc/config.xml
中添加以下代码来实现这一点:

<adminhtml>
<menu>
    <example translate="title" module="adminhtml">
        <title>Inventory</title>
        <sort_order>110</sort_order>
        <children>
            <set_time>
                <title>Set It!</title>
                <action>helloworld/index/goodbye</action>
            </set_time>
        </children>
    </example>
</menu> 

库存
110
设定它!
helloworld/索引/再见

问题是我无法将此菜单包含在权限->角色资源中,因此无法将其分配给特定用户

如何在权限->角色资源中包含此菜单


谢谢你和更多的力量

您需要告诉magento您希望您的新菜单位置在权限树中可见。为此,必须向配置数据中添加ACL节。将其放入模块的config.xml文件中:

     <acl>
        <resources>
            <admin>
                <children>
                    <example>
                            <title>Inventory</title>
                            <sort_order>110</sort_order>
                            <children>
                                <set_time>
                                    <title>Set It!</title>
                                    <sort_order>0</sort_order>
                                </set_time>
                            </children>
                    </example>
                </children>
            </admin>
        </resources>
    </acl>

库存
110
设定它!
0

谢谢。。我对它进行了一些调整

<adminhtml>
    <acl>
        <resources>
            <admin>
                <children>

 <helloworld_options translate="label" module="helloworld">
  <title> MENU</title>
                    <sort_order>999</sort_order>
                    <children>
   <hello_children1>
    <title> RELATION</title>
                            <sort_order>10</sort_order>
   </hello_children1>
   <hello_children2>
    <title> MACHINE</title>
                            <sort_order>20</sort_order>
   </hello_children2>
   <hello_children3>
    <title> INVOICE</title>
                            <sort_order>30</sort_order>
   </hello_children3>
  </children>
 </helloworld_options>

                    <system>
                        <children>
                            <config>
                                <children>
                                    <helloworld_options translate="label" module="helloworld">
                                        <title> MENU</title>
                                    </helloworld_options>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</adminhtml>

菜单
999
关系
10
机器
20
发票
30
菜单
这将在后端显示以下带有子菜单的菜单。。此外,还可以在角色资源中配置此功能:)