Submenu items for ManageSiteMap

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Hi all,
I'm building a plug-in based upon the PromoSlider code. I'm trying to make it compatible with v3.8.

How do I get multiple menu sub items to show up?

Here is the code I'm using:


        public void ManageSiteMap(SiteMapNode rootNode)
        {
            var parentNode = new SiteMapNode()
            {
                Visible = true,
                Title = "Promo Slider",
                Url = "/PromoSlider/CreateUpdatePromoSlider"
            };

            var createUpdateNode = new SiteMapNode()
            {
                Visible = true,
                Title = "New Slider",
                Url = "/PromoSlider/CreateUpdatePromoSlider"
            };

            var manageSliders = new SiteMapNode()
            {
                Visible = true,
                Title = "Manage Sliders",
                Url = "/PromoSlider/ManagePromoSliders"
            };

            parentNode.ChildNodes.Add(createUpdateNode);
            parentNode.ChildNodes.Add(manageSliders);



            var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");
            if (pluginNode != null)
                pluginNode.ChildNodes.Add(parentNode);
            else
                rootNode.ChildNodes.Add(parentNode);
        }

    }


But, the "New Slider" and "Manage Sliders" links are not showing up.

Here's what I'm seeing:



Thanks!
7 years ago
for the parent Node just remove the Url attribute and it should work.
6 years ago
exactly what I need. perfect!
6 years ago
sammyN wrote:
Hi all,
I'm building a plug-in based upon the PromoSlider code. I'm trying to make it compatible with v3.8.

How do I get multiple menu sub items to show up?

Here is the code I'm using:


        public void ManageSiteMap(SiteMapNode rootNode)
        {
            var parentNode = new SiteMapNode()
            {
                Visible = true,
                Title = "Promo Slider",
                Url = "/PromoSlider/CreateUpdatePromoSlider"
            };

            var createUpdateNode = new SiteMapNode()
            {
                Visible = true,
                Title = "New Slider",
                Url = "/PromoSlider/CreateUpdatePromoSlider"
            };

            var manageSliders = new SiteMapNode()
            {
                Visible = true,
                Title = "Manage Sliders",
                Url = "/PromoSlider/ManagePromoSliders"
            };

            parentNode.ChildNodes.Add(createUpdateNode);
            parentNode.ChildNodes.Add(manageSliders);



            var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");
            if (pluginNode != null)
                pluginNode.ChildNodes.Add(parentNode);
            else
                rootNode.ChildNodes.Add(parentNode);
        }

    }


But, the "New Slider" and "Manage Sliders" links are not showing up.

Here's what I'm seeing:



Thanks!


Look at here I explained that before
https://www.nopcommerce.com/boards/t/46799/how-to-add-new-link-in-admin-menu-.aspx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.