Fixed order of exported content part elements.

This fixes an issue where the LayoutPart XML element would appear last in the content item XML element due to the fact that the <LayoutPart> element was being added only in the Exported event and not in the Exporting event.

To fix this, the <LayoutPart> element is no first added during the Exporting event, and later updated in the Exporting event.
This commit is contained in:
Sipke Schoorstra
2015-10-13 20:17:03 +02:00
parent 40156e5be1
commit 5344ed2e2a

View File

@@ -144,6 +144,8 @@ namespace Orchard.Layouts.Drivers {
context.Element(part.PartDefinition.Name).SetAttributeValue("TemplateId", templateIdentity);
}
}
context.Element(part.PartDefinition.Name).SetElementValue("LayoutData", part.LayoutData);
}
protected override void Exported(LayoutPart part, ExportContentContext context) {