mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
@@ -15,14 +15,6 @@ namespace Orchard.Core.Navigation.Handlers {
|
||||
_contentManager = contentManager;
|
||||
}
|
||||
|
||||
protected override void GetItemMetadata(GetContentItemMetadataContext context) {
|
||||
if(context.ContentItem.ContentType != "Menu") {
|
||||
return;
|
||||
}
|
||||
|
||||
context.Metadata.Identity.Add("name", context.ContentItem.As<TitlePart>().Title);
|
||||
}
|
||||
|
||||
protected override void Removing(RemoveContentContext context) {
|
||||
if (context.ContentItem.ContentType != "Menu") {
|
||||
return;
|
||||
|
@@ -190,5 +190,13 @@ namespace Orchard.Core.Navigation {
|
||||
|
||||
return 5;
|
||||
}
|
||||
|
||||
public int UpdateFrom5() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("Menu", cfg => cfg
|
||||
.WithPart("IdentityPart")
|
||||
);
|
||||
|
||||
return 6;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user