我为3个菜单项设置了3个不同的控制器,并为所有3个指定了SelectedActions。但总是选择所有3个菜单项。您能否查看以下代码,如果我需要纠正任何问题,请告诉我?
Piranha.WebPages.Manager.Menu.Where(m => m.InternalId == "Eagle").Single().Items.Add(
new Manager.MenuItem()
{
Name = "aaa",
Action = "Index",
Controller = "Media",
Permission = "ADMIN",
SelectedActions = "Index,Edit"
});
Piranha.WebPages.Manager.Menu.Where(m => m.InternalId == "Eagle").Single().Items.Add(
new Manager.MenuItem()
{
Name = "bbb",
Action = "Index",
Controller = "Attest",
Permission = "ADMIN",
SelectedActions = "Index"
});
Piranha.WebPages.Manager.Menu.Where(m => m.InternalId == "Eagle").Single().Items.Add(
new Manager.MenuItem()
{
Name = "ccc",
Action = "Index",
Controller = "Order",
Permission = "ADMIN",
SelectedActions = "Index,Details"
});
即使我将所有3个菜单代码移动到一个控制器中,也没有任何变化!