mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-11-28 17:32:44 +08:00
Specializing a widget's alternate to use the shape name too. Otherwise there
could be conflicts if two shapes are returned for the same content item. --HG-- branch : 1.x
This commit is contained in:
@@ -31,8 +31,8 @@ namespace Orchard.DesignerTools.Services {
|
||||
|
||||
// Add 2 alternates for flexible widget shape naming:
|
||||
// [ShapeName]-[ZoneName].cshtml: (e.g. "Parts.Blogs.RecentBlogPosts-myZoneName.cshtml")
|
||||
// [ContentTypeName]-[ZoneName].cshtml: (e.g. "RecentBlogPosts-myZoneName.cshtml")
|
||||
displayedContext.ShapeMetadata.Alternates.Add(contentTypeName + "__" + zoneName);
|
||||
// [ShapeName]-[ContentTypeName]-[ZoneName].cshtml: (e.g. "Parts.Common.Body-RecentBlogPosts-myZoneName.cshtml")
|
||||
displayedContext.ShapeMetadata.Alternates.Add(shapeName + "__" + contentTypeName + "__" + zoneName);
|
||||
displayedContext.ShapeMetadata.Alternates.Add(shapeName + "__" + zoneName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user