Adding Custom Menu in Backend
-
16-10-2019 - |
문제
To create a custom menu in back-end we create adminhtml.xml
with following code into this file. My question is which file(s) are responsible to process this adminhtml.xml
file to add our new menu item to the menu.
<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>
해결책
According to app/design/adminhtml/layout/main.xml
this block is loaded for the menu:
<block type="adminhtml/page_menu" name="menu" as="menu"></block>
So that concludes that Mage_Adminhtml_Block_Page_Menu
(function _buildMenuArray
) takes care of building the menu and processing everything. Of course many different components are used in this block.
제휴하지 않습니다 magento.stackexchange