mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
22 lines
717 B
C#
22 lines
717 B
C#
using Orchard.ContentManagement.MetaData;
|
|
using Orchard.Core.Contents.Extensions;
|
|
using Orchard.Data.Migration;
|
|
|
|
namespace Orchard.Templates {
|
|
public class Migrations : DataMigrationImpl {
|
|
public int Create() {
|
|
|
|
ContentDefinitionManager.AlterPartDefinition("ShapePart", part => part
|
|
.Attachable()
|
|
.WithDescription("Turns a type into a shape provider."));
|
|
|
|
ContentDefinitionManager.AlterTypeDefinition("Template", type => type
|
|
.WithPart("CommonPart")
|
|
.WithIdentity()
|
|
.WithPart("TitlePart")
|
|
.WithPart("ShapePart")
|
|
.Draftable());
|
|
return 1;
|
|
}
|
|
}
|
|
} |