Hi,
I can't really find the answer online. So I'll do a little post: I'm new to Nopcommerce just installed 3.8 first all congrats to the team really nice job, the new admin layout was just what nc needed.
so I wanted to install my own made plugins in the 3.80 and it turns out that the submenus suddenly don't work any more. I had a look at the code and it seems good to me aso I had no changes in the code and in version 3.6 everything worked fine.
I tried to look for references of classes that implented the: SiteMapNode class but for some reason I can't seem to find one.
Could some one have a look at this, what I'm I missing here?
#region MenuItems Aanmaken.
public SiteMapNode BuildMenuItem()
{
var parentNode = new SiteMapNode()
{
Visible = true,
Title = "Mailing System",
Url = "/PHMailingSystem/Campaigns",
RouteValues = new RouteValueDictionary(){{"Area","Admin"}}
};
#region Campaigns
var campaigns = new SiteMapNode()
{
Visible = true,
Title = "Campaigns",
Url = "/PHMailingSystem/Campaigns"
};
var createNewCampaign = new SiteMapNode()
{
Visible = true,
Title = "New email campaign",
Url = "/PHMailingSystem/Settings"
};
var listCampaign = new SiteMapNode()
{
Visible = true,
Title = "All campaigns",
Url = "/PHMailingSystem/Campaigns"
};
campaigns.ChildNodes.Add(createNewCampaign);
campaigns.ChildNodes.Add(listCampaign);
#endregion
#region Templates
var templates = new SiteMapNode()
{
Visible = true,
Title = "E-Mail templates",
Url = "/PHMailingSystem/Templates"
};
var createTemplate = new SiteMapNode()
{
Visible = true,
Title = "New template",
Url = "/PHMailingSystem/Template"
};
var listTemplates = new SiteMapNode()
{
Visible = true,
Title = "All templates",
Url = "/PHMailingSystem/Templates"
};
templates.ChildNodes.Add(createTemplate);
templates.ChildNodes.Add(listTemplates);
#endregion
#region GeneralSettings
var generalsettings = new SiteMapNode()
{
Visible = true,
Title = "Settings",
Url = "/PHMailingSystem/GeneralSettings"
};
#endregion
#region Help
var help = new SiteMapNode()
{
Visible = true,
Title = "Help",
Url = "#"
};
var about = new SiteMapNode()
{
Visible = true,
Title = "About",
Url = "/PHMailingSystem/About"
};
var manual = new SiteMapNode()
{
Visible = true,
Title = "Manuals",
Url = "/PHMailingSystem/Manuals"
};
help.ChildNodes.Add(about);
help.ChildNodes.Add(manual);
#endregion
parentNode.ChildNodes.Add(campaigns);
parentNode.ChildNodes.Add(templates);
parentNode.ChildNodes.Add(generalsettings);
parentNode.ChildNodes.Add(help);
return parentNode;
}
/// <summary>
/// Voor de menu-items die in BuildMenuItem werden aangemaakt toe te voegen aan het Menu en standaard mailing systeem niet meer te tonen.
/// </summary>
/// <param name="rootNode"></param>
public void ManageSiteMap(SiteMapNode rootNode)
{
rootNode.ChildNodes.Add(BuildMenuItem());
}
#endregion