mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 20:13:52 +08:00
Everything for the new part, content type and widget are there except for what makes them useful (back-end logic & data and complete shape templates) --HG-- branch : dev
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using Orchard.ContentManagement.MetaData;
|
|
using Orchard.Core.Contents.Extensions;
|
|
using Orchard.Data.Migration;
|
|
|
|
namespace Orchard.ContentQueries {
|
|
public class Migrations : DataMigrationImpl {
|
|
public int Create() {
|
|
//SchemaBuilder.CreateTable("ContentQueryPartRecord",
|
|
// table => table
|
|
// .ContentPartRecord()
|
|
// );
|
|
|
|
ContentDefinitionManager.AlterTypeDefinition("ContentQuery",
|
|
cfg => cfg
|
|
.WithPart("ContentQueryPart")
|
|
.WithPart("CommonPart")
|
|
.WithPart("RoutePart")
|
|
.WithPart("MenuPart")
|
|
.Creatable()
|
|
);
|
|
|
|
ContentDefinitionManager.AlterTypeDefinition("ContentQueryWidget",
|
|
cfg => cfg
|
|
.WithPart("ContentQueryPart")
|
|
.WithPart("CommonPart")
|
|
.WithPart("WidgetPart")
|
|
.WithSetting("Stereotype", "Widget")
|
|
);
|
|
|
|
return 1;
|
|
}
|
|
}
|
|
} |