mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-01-23 21:32:14 +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 layoutIndex = XmlHelper.Parse<int>(context.ExportableData.Get("LayoutIndex"));
|
||||
var layout = queryPart.Layouts[layoutIndex];
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user