Menu Close
    Start a Project Request quote Reading list Switch to dark mode
    magento-hyperlocal-marketplace-guide

    Hide Admin Menu Based on System Config in Magento 2

    Hello Readers! In this blog I will show, how you can hide admin menu based on system configuration and module availability in Magento 2.

    This feature is very essential when we are developing a module with multiple features and have option to enable or disable some features. To show menu in admin menu section we write code in menu.xml file which is in Webkul/ModuleName/etc/adminhtml folder. So let’s see how it’s done in below code,

    With the attribute dependsOnModule we can manage visibility of the menu based on availability on any module. And with attribute dependsOnConfig we can manage visibility of the menu based on system config field.

    Thanks for reading the blog. Please comment if you face any issue.

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again
    Close