public void ManageSiteMap(SiteMapNode rootNode)
{
var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");
if (pluginNode != null)
{
var newNode = new SiteMapNode()
{
Title = string.Format("XtremeCommerce {0}", _localizationService.GetResource("Plugins.Widgets.XtremeCommerce.Sliders")),
// Title for your Custom Menu Item
ControllerName = "Widget", // Your controller Name
ActionName = "ConfigureWidget", // Action Name
Visible = true,
RouteValues = new RouteValueDictionary() { { "area", "admin" } }
};
newNode.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 } },
});
pluginNode.ChildNodes.Add(newNode);
}
}
Hi Ron,
But why do you have RouteValues specified as "new RouteValueDictionary() { { "area", "admin" } }"? Shouldn't it be "new RouteValueDictionary() { { "systemName", this.PluginDescriptor.SystemName } }," as in the second menu item? It'll work fine if you replace it. That's about the first menu item
But I don't understand why your second child item (nested one) is not rendered. I've created a separate work item