I want to hide my custom module menu based on configuration. If in configuration it set to "yes" then the menu should display and if set to "no" then menu should not appear at admin.
I have below code for add menu:
<menu>
<add id="Name_Module::parent" title="title" module="Name_Module" sortOrder="51" resource="Name_Module::parent"/>
<add id="Name_Module::shippinglocation" title="Manage title" module="Name_Module" sortOrder="40" parent="Name_Module::parent" action="controller/action" resource="Name_Module::module"/>
</menu>
How can i achieve this?
Thanks