i created one testing module in magento2 and for backend added menu by this code:

location of this file is Test/Seller/etc/adminhtml/menu.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Backend/etc/menu.xsd">
<add id="Test_Seller::seller" title="Seller" module="Test_Seller" sortOrder="40" resource="Test_Seller::seller"/>
    <add id="Test_Seller::items" title="Manage Sellers" module="Test_Seller" sortOrder="40" parent="Test_Seller::seller" action="selleradmin/manage/" resource="Test_Seller::items"/>

its working fine. all parameters are clear but what is ther use of resource parameter in add node. if i remove this parameter then "Missing required param resource" error is coming.

1 Answer 1


Resource attribute define acl resource for menu element. If user has not access to this resource then the menu item will be not shown for him.

  • but how can we map with resource, means if i am changing id of resource in acl.xml or changing resource attribute value then also menu is shown. Oct 14, 2015 at 12:17
  • and what is the point of id attribute and the Module::something value in it ? Feb 20, 2016 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.