3

Just want to hide 'MagePlaza' from left navigation, which make client confuse.

I am trying to find simple and easy solution.

enter image description here

1

5 Answers 5

4

If you don't want to change in code then create new role for your client and add all resource except mageplaza and assign that rule to your client admin.

This link will help you to create role.

https://www.mageplaza.com/kb/how-to-create-user-role-magento-2.html

3
  • yes I did this for time period, but looking for solid solution. Commented Oct 23, 2018 at 9:07
  • 1
    I think this way is good because if you change in mageplaza xml file and in future if you update extension then you have to change in same file again so better to create role Commented Oct 23, 2018 at 9:10
  • valid point (thumbs up) Commented Oct 23, 2018 at 9:11
3

Goto your module directory in etc > adminhtml > menu.xml

add <remove id="menu_id"/> before ending <menu> node.
menu_id is a identifier which you set in <add> node id attribute.

2
  • getting security error Commented Oct 23, 2018 at 9:08
  • add <remove id="Mageplaza_Core::menu" /> in <menu> node before ending. i have updated the answer let me know.
    – Himanshu
    Commented Oct 23, 2018 at 9:09
2

If you have installed this module via composer then you have to follow below directory: [Your_Projetc_Folder_Name]/vendor/mageplaza/module-core/etc/adminhtml/menu.xml and comment the code

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd"> 
<!--<menu>
            <add id="Mageplaza_Core::menu" title="Mageplaza" module="Mageplaza_Core" sortOrder="50" resource="Mageplaza_Core::menu"/>
            <add id="Mageplaza_Core::documentation" title="Documentations" module="Mageplaza_Core" sortOrder="999" resource="Mageplaza_Core::documentation" parent="Mageplaza_Core::menu"/>
            <add id="Mageplaza_Core::marketplace" title="Mageplaza Marketplace" module="Mageplaza_Core" sortOrder="10" action="adminhtml/system_config/edit/section/mpmarketplace" resource="Mageplaza_Core::marketplace" parent="Mageplaza_Core::documentation"/>
            <add id="Mageplaza_Core::userguide" title="User Guides" module="Mageplaza_Core" sortOrder="20" action="mpcore/index/userguide" resource="Mageplaza_Core::userguide" parent="Mageplaza_Core::documentation"/>
        </menu>--> 
</config>

Otherwise you can follow @Ravi's way.

1
  • You should never make changes in your vendor folder
    – jonasG
    Commented Nov 15, 2018 at 10:04
1

You can remove the menu item with a custom module. It's important that the module load after the module you want to override, in this case Mageplaza_Core, so you specify it in the module.xml under sequence. Then you can remove the item by ID in etc/adminhtml/menu.xml.

app/code/YourOrg/YourModule/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="YourOrg_YourModule" setup_version="1.0.0" active="true">
        <sequence>
            <module name="Mageplaza_Core"/>
        </sequence>
    </module>
</config>

app/code/YourOrg/YourModule/etc/adminhtml/menu.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <remove id="Mageplaza_Core::menu" />
    </menu>
</config>
0

Comment below code

/app/code/Mageplaza/Core/etc/adminhtml/menu.xml

    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
<!-- <menu>
<add id="Mageplaza_Core::menu" title="Mageplaza" module="Mageplaza_Core" sortOrder="50" resource="Mageplaza_Core::menu"/>
<add id="Mageplaza_Core::documentation" title="Documentations" module="Mageplaza_Core" sortOrder="999" resource="Mageplaza_Core::documentation" parent="Mageplaza_Core::menu"/>
<add id="Mageplaza_Core::marketplace" title="Mageplaza Marketplace" module="Mageplaza_Core" sortOrder="10" action="adminhtml/system_config/edit/section/mpmarketplace" resource="Mageplaza_Core::marketplace" parent="Mageplaza_Core::documentation"/>
<add id="Mageplaza_Core::userguide" title="User Guides" module="Mageplaza_Core" sortOrder="20" action="mpcore/index/userguide" resource="Mageplaza_Core::userguide" parent="Mageplaza_Core::documentation"/>
</menu> -->
</config>

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.