Orchard cms中的MenuItem

时间:2015-08-05 07:41:41

标签: asp.net orchardcms orchardcms-1.8 orchard-modules

我想在管理页面中添加一个新菜单项。但是没有成功。

我在项目中创建了AdminMenu:

 public class AdminMenu : INavigationProvider 
     {
      public AdminMenu()
      {
        T = NullLocalizer.Instance;
       }
 private Localizer T { get; set; }
 public string MenuName { get { return "admin"; } }


 public void GetNavigation(NavigationBuilder builder)
   {
     builder.AddImageSet("UsedEquipProperty").Add(T("UsedEquipProperty"), "7",   BuildUsedEquipmentProperty);
   }
   private void BuildUsedEquipmentProperty(NavigationItemBuilder menu)
    {
     menu.Add(T("UsedEquipProperty"), "7.1", item => item.Action("Index",      "UsedEquipmentProperty", new { area = "MyModule"   }).Permission(Permissions.EditOwnContent));

     menu.Add(T("Create Property"), "7.2", item => item.Action("Create",   "UsedEquipmentProperty", new { area = "MyModule" }).Permission(Permissions.EditOwnContent));
}

我错过了什么吗?我无法在管理页面上看到我添加的菜单项。

0 个答案:

没有答案