How to add menu list item in existing top menu using plugin 4.4.4

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
How to add menu item in existing top menu using plugin 4.4.4

Hi,
I want to add one menu item in our existing top menu in custom plugin .

Please help
2 years ago
Hello please refer this link , you can easily added a site map menu  

or if needed then you can try this

public void ManageSiteMap(SiteMapNode rootNode)
        {
            var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");
            if (pluginNode != null)
            {
                var parentNode = new SiteMapNode() // this one is showing only
                {
                    //SystemName = "Widgets.PromoSlider",
                    Title = "Promo Slider",
                    ControllerName = "PromoSlider",
                    ActionName = "CreateUpdatePromoSlider",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", "admin" } }
                };

                parentNode.ChildNodes.Add(new SiteMapNode()
                {
                    Title = _localizationService.GetResource("Admin.Configuration.Settings"),
                    //   Title for your Sub Menu item
                    ControllerName = "Widget", // Your controller Name
                    ActionName = "ConfigureWidget", // Action Name
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "systemName", this.PluginDescriptor.SystemName } },
                });
                parentNode.ChildNodes.Add(new SiteMapNode()
                {
                    SystemName = "Widgets.PromoSlider",
                    Title = "Manage Sliders",
                    ControllerName = "PromoSlider",
                    ActionName = "ManagePromoSliders",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "Namespaces", "Nop.Plugin.Widgets.PromoSlider.Controllers" }, { "area", null } }
                });
                pluginNode.ChildNodes.Add(parentNode);
            }
            
        }


Hope this will helpful to you
still have issue let me know
Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.