diff --git a/src/Orchard/ContentManagement/Drivers/ContentFieldDriver.cs b/src/Orchard/ContentManagement/Drivers/ContentFieldDriver.cs index 3a8a1f7c4..14f778549 100644 --- a/src/Orchard/ContentManagement/Drivers/ContentFieldDriver.cs +++ b/src/Orchard/ContentManagement/Drivers/ContentFieldDriver.cs @@ -148,39 +148,39 @@ namespace Orchard.ContentManagement.Drivers { var shapeType = metadata.Type; var fieldName = differentiator ?? String.Empty; - string partName = ctx.ContentPart.PartDefinition.Name; + var partName = ctx.ContentPart.PartDefinition.Name; string contentType = shape.ContentItem.ContentType; // whether the content type has been created dynamically or not - var dynamicType = string.Equals(partName, contentType, StringComparison.Ordinal); + var dynamicType = String.Equals(partName, contentType, StringComparison.Ordinal); // [ShapeType__FieldName] e.g. Fields/Common.Text-Teaser - if ( !string.IsNullOrEmpty(fieldName) ) + if ( !String.IsNullOrEmpty(fieldName) ) metadata.Alternates.Add(shapeType + "__" + EncodeAlternateElement(fieldName)); // [ShapeType__PartName] e.g. Fields/Common.Text-TeaserPart - if ( !string.IsNullOrEmpty(partName) ) { + if ( !String.IsNullOrEmpty(partName) ) { metadata.Alternates.Add(shapeType + "__" + EncodeAlternateElement(partName)); } // [ShapeType]__[ContentType]__[PartName] e.g. Fields/Common.Text-Blog-TeaserPart - if ( !string.IsNullOrEmpty(partName) && !string.IsNullOrEmpty(contentType) && !dynamicType ) { + if ( !String.IsNullOrEmpty(partName) && !String.IsNullOrEmpty(contentType) && !dynamicType ) { metadata.Alternates.Add(EncodeAlternateElement(shapeType + "__" + contentType + "__" + partName)); } // [ShapeType]__[PartName]__[FieldName] e.g. Fields/Common.Text-TeaserPart-Teaser - if ( !string.IsNullOrEmpty(partName) && !string.IsNullOrEmpty(fieldName) ) { + if ( !String.IsNullOrEmpty(partName) && !String.IsNullOrEmpty(fieldName) ) { metadata.Alternates.Add(EncodeAlternateElement(shapeType + "__" + partName + "__" + fieldName)); } // [ShapeType]__[ContentType]__[FieldName] e.g. Fields/Common.Text-Blog-Teaser - if ( !string.IsNullOrEmpty(contentType) && !string.IsNullOrEmpty(fieldName) ) { + if ( !String.IsNullOrEmpty(contentType) && !String.IsNullOrEmpty(fieldName) ) { metadata.Alternates.Add(EncodeAlternateElement(shapeType + "__" + contentType + "__" + fieldName)); } // [ShapeType]__[ContentType]__[PartName]__[FieldName] e.g. Fields/Common.Text-Blog-TeaserPart-Teaser - if ( !string.IsNullOrEmpty(contentType) && !string.IsNullOrEmpty(partName) && !string.IsNullOrEmpty(fieldName) && !dynamicType ) { - metadata.Alternates.Add(EncodeAlternateElement(shapeType + "__" + contentType + "__" + partName)); + if ( !String.IsNullOrEmpty(contentType) && !String.IsNullOrEmpty(partName) && !String.IsNullOrEmpty(fieldName) && !dynamicType ) { + metadata.Alternates.Add(EncodeAlternateElement(shapeType + "__" + contentType + "__" + partName + "__" + fieldName)); } return shape;