How to overwrite navigation menu?

Hello. I have a project with both an internal and an external plugin. How can I overwrite the backend menu of the external plugin? I’m attempting to hide certain submenu entries and relocate others from the plugin’s main menu to my plugin’s menu.
I’ve seen this guide, but I’m only achieving the loss of the submenu sidebar from my plugin.
Thanks!

Thanks!
How should I move a submenu from one plugin’s main menu to another? Is it sufficient to use addSideMenuItems and specify the URL of the original controller? How should I then handle the context? The examples in the documentation do not address this case

Extending the controller of the external plugin, you can set your own context

ExternalPluginController::extend(function($controller) {
        $controller->bindEvent('page.beforeDisplay', function ($action, $params) {     
                BackendMenu::setContext('owner', 'mainMenuItemCode', 'sideMenuItemCode');
          });
 });
1 Like