如何将 Magento 管理菜单链接到角色资源
情况是这样的:
我想在 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>
问题是我无法将此菜单包含在权限->角色资源中,因此我无法将其分配给特定用户。
如何将此菜单包含在权限->角色资源中?
谢谢你,还有更多的力量!
Here's the situation:
I would like to add a Menu in the Magento backend navigation menu.
I accomplished this by adding the following code in 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>
The problem is I can't include this menu in the permission->role resources so I can't assign this to a specific user.
How do I include this menu in the permission->role resources?
Thank you and more power!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要告诉 magento 您希望新的菜单位置在权限树中可见。为此,您必须将 ACL 部分添加到配置数据中。将其放入模块的 config.xml 文件中:
You need to tell magento that you want your new menu position to be visible in the permission tree. To do this you have to add an ACL section to your configuration data. Put this inside your module's config.xml file:
谢谢..我让它可以进行一些调整..
这将在后端显示以下菜单和子菜单..另外这可以在角色资源中配置..:)
thanks.. I got it to work with a few tweakings..
this will display the following menu with sub menus in the backend.. plus this can be configured in the role resources.. :)