Adding missing code to previous changeset

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-02-24 17:01:28 -08:00
parent f2c0a599cb
commit f37ab46ee9

View File

@@ -19,6 +19,8 @@ namespace Orchard.ContentManagement.Drivers {
result.ContentPart = ContentPart;
}
// copy the ContentField which was used to render this result to its children
// so they can assign it to the concrete shapes
if (result.ContentField == null && ContentField != null) {
result.ContentField = ContentField;
}
@@ -29,6 +31,19 @@ namespace Orchard.ContentManagement.Drivers {
public override void Apply(BuildEditorContext context) {
foreach (var result in _results) {
// copy the ContentPart which was used to render this result to its children
// so they can assign it to the concrete shapes
if (result.ContentPart == null && ContentPart != null) {
result.ContentPart = ContentPart;
}
// copy the ContentField which was used to render this result to its children
// so they can assign it to the concrete shapes
if (result.ContentField == null && ContentField != null) {
result.ContentField = ContentField;
}
result.Apply(context);
}
}