diff --git a/src/Orchard/DisplayManagement/Descriptors/ShapeAlterationBuilder.cs b/src/Orchard/DisplayManagement/Descriptors/ShapeAlterationBuilder.cs index 8326e2ddb..33eed23dd 100644 --- a/src/Orchard/DisplayManagement/Descriptors/ShapeAlterationBuilder.cs +++ b/src/Orchard/DisplayManagement/Descriptors/ShapeAlterationBuilder.cs @@ -7,13 +7,22 @@ using Orchard.Environment.Extensions.Models; namespace Orchard.DisplayManagement.Descriptors { public class ShapeAlterationBuilder { - protected Feature _feature; - protected string _shapeType; - protected readonly IList> _configurations = new List>(); + Feature _feature; + readonly string _shapeType; + readonly string _bindingName; + readonly IList> _configurations = new List>(); public ShapeAlterationBuilder(Feature feature, string shapeType) { _feature = feature; - _shapeType = shapeType; + _bindingName = shapeType; + var delimiterIndex = shapeType.IndexOf("__"); + + if (delimiterIndex < 0) { + _shapeType = shapeType; + } + else { + _shapeType = shapeType.Substring(0, delimiterIndex); + } } public ShapeAlterationBuilder From(Feature feature) { @@ -33,7 +42,7 @@ namespace Orchard.DisplayManagement.Descriptors { Func target = null; var binding = new ShapeBinding { - BindingName = _shapeType, + BindingName = _bindingName, BindingSource = bindingSource, Binding = displayContext => {