Skip to content
Permalink
Browse files

Fixing that Layouts couldn't be export/imported properly because they…

… lacked an identity
  • Loading branch information...
LombiqTechnologies committed Aug 13, 2015
1 parent 564fdc2 commit 64585223eeb6acd49fe2768aa5ee24c5dd457595
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/Orchard.Web/Modules/Orchard.Layouts/Migrations.cs
@@ -29,6 +29,7 @@ public class Migrations : DataMigrationImpl {
.WithSetting("OwnerEditorSettings.ShowOwnerEditor", "false")
.WithSetting("DateEditorSettings.ShowDateEditor", "false"))
.WithPart("TitlePart")
.WithPart("IdentityPart")
.WithPart("LayoutPart", p => p
.WithSetting("LayoutTypePartSettings.IsTemplate", "True"))
.DisplayedAs("Layout")
@@ -62,14 +63,21 @@ public class Migrations : DataMigrationImpl {
.WithPart("LayoutPart", p => p
.WithSetting("LayoutTypePartSettings.IsTemplate", "False")));

return 2;
return 3;
}

public int UpdateFrom1() {
SchemaBuilder.AlterTable("ElementBlueprint", table => table.AddColumn<string>("ElementDescription", c => c.WithLength(2048)));
return 2;
}

public int UpdateFrom2() {
ContentDefinitionManager.AlterTypeDefinition("Layout", type => type
.WithPart("IdentityPart"));

return 3;
}

private void DefineElementWidget(string widgetTypeName, string widgetDisplayedAs, string elementTypeName) {
ContentDefinitionManager.AlterTypeDefinition(widgetTypeName, type => type
.WithPart("CommonPart", p => p

0 comments on commit 6458522

Please sign in to comment.
You can’t perform that action at this time.