mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixing exception when importing Projection Elements with the default layout selected
Fixed the export of this previously, this was remaining.
This commit is contained in:
@@ -307,10 +307,9 @@ namespace Orchard.Layouts.Drivers {
|
|||||||
|
|
||||||
var queryPart = query.As<QueryPart>();
|
var queryPart = query.As<QueryPart>();
|
||||||
var layoutIndex = XmlHelper.Parse<int>(context.ExportableData.Get("LayoutIndex"));
|
var layoutIndex = XmlHelper.Parse<int>(context.ExportableData.Get("LayoutIndex"));
|
||||||
var layout = queryPart.Layouts[layoutIndex];
|
|
||||||
|
|
||||||
element.QueryId = queryPart.Id;
|
element.QueryId = queryPart.Id;
|
||||||
element.LayoutId = layout.Id;
|
element.LayoutId = layoutIndex != -1 ? queryPart.Layouts[layoutIndex].Id : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetLayoutDescription(IEnumerable<LayoutDescriptor> layouts, LayoutRecord l) {
|
private static string GetLayoutDescription(IEnumerable<LayoutDescriptor> layouts, LayoutRecord l) {
|
||||||
|
|||||||
Reference in New Issue
Block a user