mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge
--HG-- branch : 1.x
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user