Pushing driver and editor down to ElementDescriptor.

This allows for more granular control over what gets rendered when.
One scenario that this enables is where one can create an Element Blueprint and use it as a widget via the ElementWrapperPart.
This commit is contained in:
Sipke Schoorstra
2014-11-20 23:37:40 -08:00
parent 88d165e31c
commit e1ed30a1f8
10 changed files with 59 additions and 55 deletions

View File

@@ -49,7 +49,7 @@ namespace Orchard.Layouts.Providers {
var elementName = GetDisplayName(shapeDescriptor.Value.BindingSource);
var closureDescriptor = shapeDescriptor;
yield return new ElementDescriptor(elementType, shapeType, T(elementName), snippetElement.Category) {
Displaying = displayContext => Displaying(displayContext, closureDescriptor.Value)
Display = displayContext => Displaying(displayContext, closureDescriptor.Value)
};
}
}