-
16-10-2019 - |
题
创建一个 后端的自定义菜单 我们创建 adminhtml.xml
在此文件中以下代码。我的问题是哪些文件负责处理此问题 adminhtml.xml
文件以将我们的新菜单项添加到菜单中。
<adminhtml>
<menu>
<[module] module="[module]">
<title>[Module]</title>
<sort_order>71</sort_order>
<children>
<items module="[module]">
<title>Manage Items</title>
<sort_order>0</sort_order>
<action>[module]/adminhtml_[module]</action>
</items>
</children>
</[module]>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<[module]>
<title>[Module] Module</title>
<sort_order>200</sort_order>
</[module]>
</children>
</admin>
</resources>
</acl>
</adminhtml>
解决方案
根据 app/design/adminhtml/layout/main.xml
此块已为菜单加载:
<block type="adminhtml/page_menu" name="menu" as="menu"></block>
因此得出的结论是 Mage_Adminhtml_Block_Page_Menu
(function _buildMenuArray
)照顾构建菜单并处理所有内容。当然,该块中使用了许多不同的组件。