在文档中,它声明您可以从界面中删除默认视图。我添加了一个带有以下代码的新菜单项选项卡:
Piranha.WebPages.Manager.Menu.Where(m => m.InternalId == "Content").Single().Items.Add(
new Piranha.WebPages.Manager.MenuItem()
{
Name = "TSI Post",
Action = "Index",
Controller = "TSIPost",
Permission = "ADMIN_POST"
});
我想删除默认的发布选项卡。我尝试了以下代码的许多变体。
Piranha.WebPages.Manager.Menu.Where(m => m.InternalId == "Content").Single().Items.Remove(
new Piranha.WebPages.Manager.MenuItem()
{
InternalId = "Posts",
Name = "Posts",
Action = "index",
Controller = "post",
Permission = "ADMIN_POST"
});
删除选项卡的正确语法是什么?