1

In magento1.x if we want to display menu depends on system configuration of our module then we use following code for ex.

<menu>
    <test translate="title">
       <depends>
           <config>section/group/field</config>
       </depends>
       <title>Test Menu</title>
    </test>
</menu>

How can we achieve this in magento 2.x

1 Answer 1

3

You can use this syntax, If you want to add menu based on system configuration. You can change your value according your configuration with the catalog/Some_value/enabled

dependsOnConfig="catalog/Some_value/enabled"

If you want to check more menu you can easily find options from below path or visit below this link

magento\vendor\magento\module-backend\etc\menu.xsd

0

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.