mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Fixing that Layouts couldn't be export/imported properly because they lacked an identity
This commit is contained in:
parent
564fdc27be
commit
64585223ee
@ -29,6 +29,7 @@ namespace Orchard.Layouts {
|
|||||||
.WithSetting("OwnerEditorSettings.ShowOwnerEditor", "false")
|
.WithSetting("OwnerEditorSettings.ShowOwnerEditor", "false")
|
||||||
.WithSetting("DateEditorSettings.ShowDateEditor", "false"))
|
.WithSetting("DateEditorSettings.ShowDateEditor", "false"))
|
||||||
.WithPart("TitlePart")
|
.WithPart("TitlePart")
|
||||||
|
.WithPart("IdentityPart")
|
||||||
.WithPart("LayoutPart", p => p
|
.WithPart("LayoutPart", p => p
|
||||||
.WithSetting("LayoutTypePartSettings.IsTemplate", "True"))
|
.WithSetting("LayoutTypePartSettings.IsTemplate", "True"))
|
||||||
.DisplayedAs("Layout")
|
.DisplayedAs("Layout")
|
||||||
@ -62,7 +63,7 @@ namespace Orchard.Layouts {
|
|||||||
.WithPart("LayoutPart", p => p
|
.WithPart("LayoutPart", p => p
|
||||||
.WithSetting("LayoutTypePartSettings.IsTemplate", "False")));
|
.WithSetting("LayoutTypePartSettings.IsTemplate", "False")));
|
||||||
|
|
||||||
return 2;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int UpdateFrom1() {
|
public int UpdateFrom1() {
|
||||||
@ -70,6 +71,13 @@ namespace Orchard.Layouts {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int UpdateFrom2() {
|
||||||
|
ContentDefinitionManager.AlterTypeDefinition("Layout", type => type
|
||||||
|
.WithPart("IdentityPart"));
|
||||||
|
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
private void DefineElementWidget(string widgetTypeName, string widgetDisplayedAs, string elementTypeName) {
|
private void DefineElementWidget(string widgetTypeName, string widgetDisplayedAs, string elementTypeName) {
|
||||||
ContentDefinitionManager.AlterTypeDefinition(widgetTypeName, type => type
|
ContentDefinitionManager.AlterTypeDefinition(widgetTypeName, type => type
|
||||||
.WithPart("CommonPart", p => p
|
.WithPart("CommonPart", p => p
|
||||||
|
Loading…
Reference in New Issue
Block a user