--HG--
branch : 1.x
This commit is contained in:
Bertrand Le Roy
2013-03-07 00:34:59 -08:00

View File

@@ -14,14 +14,17 @@ namespace Orchard.Core.Contents {
if (contentItem != null) {
// Alternates in order of specificity.
// Display type > content type > specific content > display type for a content type > display type for specific content
// BasicShapeTemplateHarvester.Adjust will then adjust the template name
// Content__[DisplayType] e.g. Content-Summary
displaying.ShapeMetadata.Alternates.Add("Content_" + EncodeAlternateElement(displaying.ShapeMetadata.DisplayType));
// Content__[ContentType] e.g. Content-BlogPost
// Content__[ContentType] e.g. Content-BlogPost,
// adjusted to Content_[DisplayType]__[ContentType], e.g. Content.Summary-BlogPost
displaying.ShapeMetadata.Alternates.Add("Content__" + EncodeAlternateElement(contentItem.ContentType));
// Content__[Id] e.g. Content-42
// Content__[Id] e.g. Content-42,
// adjusted to Content_[DisplayType]__[Id], e.g. Content.Summary-42
displaying.ShapeMetadata.Alternates.Add("Content__" + contentItem.Id);
// Content_[DisplayType]__[ContentType] e.g. Content.Summary-BlogPost