mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 12:53:33 +08:00
30 lines
885 B
C#
30 lines
885 B
C#
![]() |
using JetBrains.Annotations;
|
|||
|
using Orchard.ContentManagement;
|
|||
|
using Orchard.ContentManagement.Drivers;
|
|||
|
|
|||
|
namespace Orchard.Core.Navigation.Models {
|
|||
|
[UsedImplicitly]
|
|||
|
public class MenuItemDriver : ContentItemDriver<MenuItem> {
|
|||
|
private readonly IOrchardServices _orchardServices;
|
|||
|
|
|||
|
public readonly static ContentType ContentType = new ContentType {
|
|||
|
Name = "menuitem",
|
|||
|
DisplayName = "Menu Item"
|
|||
|
};
|
|||
|
|
|||
|
public MenuItemDriver(IOrchardServices orchardServices) {
|
|||
|
_orchardServices = orchardServices;
|
|||
|
}
|
|||
|
|
|||
|
protected override ContentType GetContentType() {
|
|||
|
return ContentType;
|
|||
|
}
|
|||
|
|
|||
|
protected override string Prefix { get { return ""; } }
|
|||
|
|
|||
|
protected override string GetDisplayText(MenuItem item) {
|
|||
|
return item.Url;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|