I am trying to add a menu / submenu to the Plugin Admin menu item, only the "parent" node is showing without the rest. Here is a sample code.
public void ManageSiteMap(SiteMapNode rootNode)
{
var parentNode = new SiteMapNode() // this one is showing only
{
SystemName = "Widgets.PromoSlider",
Title = "Promo Slider",
ControllerName = "PromoSlider",
ActionName = "CreateUpdatePromoSlider",
Visible = true,
RouteValues = new RouteValueDictionary() { { "Namespaces", "Nop.Plugin.Widgets.PromoSlider.Controllers" }, { "area", null } }
};
var createUpdateNode = new SiteMapNode()
{
SystemName = "Widgets.PromoSlider",
Title = "New Slider",
ControllerName = "PromoSlider",
ActionName = "CreateUpdatePromoSlider",
Visible = true,
RouteValues = new RouteValueDictionary() { { "Namespaces", "Nop.Plugin.Widgets.PromoSlider.Controllers" }, { "area", null } }
};
var manageSlidersNode = 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 } }
};
parentNode.ChildNodes.Add(createUpdateNode);
parentNode.ChildNodes.Add(manageSlidersNode);
var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");
if (pluginNode != null)
pluginNode.ChildNodes.Add(parentNode);
else
rootNode.ChildNodes.Add(parentNode);
}