mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 11:17:28 +08:00
Implementing Menu Widgets
--HG-- branch : 1.x
This commit is contained in:
@@ -11,7 +11,6 @@ namespace Orchard.Core.Navigation.Handlers {
|
||||
Filters.Add(StorageFilter.For(menuPartRepository));
|
||||
|
||||
OnInitializing<MenuPart>((ctx, x) => {
|
||||
x.OnMainMenu = false;
|
||||
x.MenuText = String.Empty;
|
||||
});
|
||||
}
|
||||
|
@@ -0,0 +1,13 @@
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Data;
|
||||
|
||||
namespace Orchard.Core.Navigation.Handlers {
|
||||
public class MenuWidgetPartHandler : ContentHandler {
|
||||
public MenuWidgetPartHandler(IRepository<MenuWidgetPartRecord> repository) {
|
||||
Filters.Add(StorageFilter.For(repository));
|
||||
|
||||
OnInitializing<MenuWidgetPart>((context, part) => { part.StartLevel = 1; });
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user