Skip to content

Commit

Permalink
Fixing that Projection Elements with the Default Layout selected were…
Browse files Browse the repository at this point in the history
…n't exported
  • Loading branch information
LombiqTechnologies committed Aug 30, 2015
1 parent a0d61c6 commit fcc4a94
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ protected override void OnExporting(Projection element, ExportElementContext con
var query = element.QueryId != null ? _contentManager.Get<QueryPart>(element.QueryId.Value) : default(QueryPart);
var layout = query != null && element.LayoutId != null ? _layoutRepository.Get(element.LayoutId.Value) : default(LayoutRecord);
var queryIdentity = query != null ? _contentManager.GetItemMetadata(query).Identity.ToString() : default(string);
var layoutIndex = layout != null ? query.Layouts.IndexOf(layout) : default(int?);
var layoutIndex = layout != null ? query.Layouts.IndexOf(layout) : -1; // -1 is the Default Layout.

if (queryIdentity != null && layoutIndex != null) {
if (queryIdentity != null) {
context.ExportableData["QueryId"] = queryIdentity;
context.ExportableData["LayoutIndex"] = layoutIndex.Value.ToString();
context.ExportableData["LayoutIndex"] = layoutIndex.ToString();
}
}

Expand Down

0 comments on commit fcc4a94

Please sign in to comment.