Removing Plugins menu option in Admin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
I have installed a couple of new plugins like NOP Ajax Filter and NOP Custom Tabs.  These plugins created a new menu option in the Admin section called "Plugins" - right next to "Help".

Now I know that I can show and hide menu options in Admin by setting permissions, I also know that I can edit sitemap.xml and manually remove anything or add anything I want to.

Problem is, these two plugins above has no way for me to remove the newly created "Plugins" menu option in Admin.  I contacted them and they said it's part of the assembly and they will look into making it possible to remove in future.

So now my "not so clever" admin staff is constantly fiddling with this Plugins menu option, changing vital things, causing my shop to not function properly.  Is there any clever trick that anyone has that I can use to run some sort of code after the Admin menu has been created, to manually remove this "Plugins" menu?  That way I can enter the URL into the address bar when I need to work in these plugins, but the menu option will be gone.

Any help would be greatly appreciated.
12 years ago
As a workaround, for 2.00-2.30, you can remove the Plugins menu that is added for plugins that implement IAdminMenuPlugin by editing the view: Administration\Views\Shared\Menu.cshtml

Comment out the following (lines 47-59 for 2.30):
.Items(x =>
{
    if (adminMenuPlugins.Count() > 0)
    {
        x.Add().Text(T("Plugins").ToHtmlString()).Items(y =>
        {
            foreach (var adminMenuPlugin in adminMenuPlugins)
            {
                adminMenuPlugin.BuildMenuItem(y.Add());
            }
        });
    }
})

change to:
//.Items(x =>
//{
//    if (adminMenuPlugins.Count() > 0)
//    {
//        x.Add().Text(T("Plugins").ToHtmlString()).Items(y =>
//        {
//            foreach (var adminMenuPlugin in adminMenuPlugins)
//            {
//                adminMenuPlugin.BuildMenuItem(y.Add());
//            }
//        });
//    }
//})

This will remove the Plugins menu, so you should probably bookmark the plugins' configuration links first.

.
12 years ago
Thank you so much, that was exactly what I wanted and worked perfectly - really appreciate it!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.