Try our conversational search powered by Generative AI!

Custom admin-tool showing up in the admin-tools sub-menu

Vote:
 

I am working on migration from CMS 11 to CMS 12. The site have some gui-plugins. In this case the gui-plugins are web-forms implemented like this:

[GuiPlugIn(Area = PlugInArea.AdminMenu, Description = "My plugin-description", DisplayName = "My plugin", LanguagePath = "/admin/myplugin", UrlFromUi = "Admin/MyPlugIn.aspx")]
public class MyPlugIn : EPiServer.Shell.WebForms.WebFormsBase
{
    ...
}

They are located here in the gui:

The GuiPlugIn attribute is not supported in CMS 12. Instead, it says here, we should use menu-providers:

I have read and tested the following article:

With a menu provider you get something like this:

I would like to get my tools showing up in the sub-menu under admin-tools. Like this:

Is it possible to get my custom plugins showing up under tools? If so, how do you do it?

#294827
Edited, Jan 17, 2023 9:31
Vote:
 
const string CmsAdminMenuPath = MenuPaths.Global + "/cms/admin";
 public IEnumerable<MenuItem> GetMenuItems()
        {
            return new List<MenuItem>
            {
                  new UrlMenuItem(_localizationService.GetString("/myplugin"),
                    CmsAdminMenuPath + "/tools/mylpugin", Paths.ToResource(GetType(), "mypluginpath"))
                {
                    SortIndex = 50,
                    Alignment = MenuItemAlignment.Left,
                    AuthorizationPolicy = CmsPolicyNames.CmsAdmin
                }
            };
        }
#294902
Jan 18, 2023 16:26
agibbles - Jan 18, 2023 19:45
When I try this approach, my custom admin screens show up as new sub-tabs next to tools instead of on the left-hand side within the tools screen.
Hans Kindberg - Jan 19, 2023 6:19
@Mark Hall
Thank you for your answer. I get the same result as @agibbles.
Vote:
 

Looking at the code you will not be able to add to the existing left menu because that is a react component and does not use the menu provider options to populate.

#294978
Jan 19, 2023 16:16
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.