mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 19:34:40 +08:00
Shifting Menu Items
This commit is contained in:
@@ -1,15 +1,10 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
|
||||
namespace Orchard.Core.Navigation.Handlers {
|
||||
[UsedImplicitly]
|
||||
public class MenuItemPartHandler : ContentHandler {
|
||||
public MenuItemPartHandler(IRepository<MenuItemPartRecord> repository) {
|
||||
public MenuItemPartHandler() {
|
||||
Filters.Add(new ActivatingFilter<MenuItemPart>("MenuItem"));
|
||||
Filters.Add(StorageFilter.For(repository));
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,12 +1,9 @@
|
||||
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));
|
||||
|
||||
public MenuWidgetPartHandler() {
|
||||
OnInitializing<MenuWidgetPart>((context, part) => { part.StartLevel = 1; });
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +0,0 @@
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
|
||||
namespace Orchard.Core.Navigation.Handlers {
|
||||
public class ShapeMenuItemPartHandler : ContentHandler {
|
||||
public ShapeMenuItemPartHandler(IRepository<ShapeMenuItemPartRecord> repository) {
|
||||
Filters.Add(StorageFilter.For(repository));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user