Fixing comment in a Blog view

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2011-02-21 17:48:28 -08:00
parent 9fca99c51b
commit c26cc0973e
2 changed files with 12 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
@{
Html.AddTitleParts(T("Manage Blog").ToString());
}
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
@* Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type *@
@Display(Model)

View File

@@ -71,13 +71,19 @@ namespace Orchard.DisplayManagement.Implementation {
// invoking ShapeMetadata displaying events
shapeMetadata.Displaying.Invoke(action => action(displayingContext), Logger);
// now find the actual binding to render, taking alternates into account
ShapeBinding actualBinding;
if (TryGetDescriptorBinding(shapeMetadata.Type, shapeMetadata.Alternates, shapeTable, out actualBinding) ) {
shape.Metadata.ChildContent = Process(actualBinding, shape, context);
// use pre-fectched content if available (e.g. coming from specific cache implmentation)
if ( displayingContext.ChildContent != null ) {
shape.Metadata.ChildContent = displayingContext.ChildContent;
}
else {
throw new OrchardException(T("Shape type {0} not found", shapeMetadata.Type));
// now find the actual binding to render, taking alternates into account
ShapeBinding actualBinding;
if ( TryGetDescriptorBinding(shapeMetadata.Type, shapeMetadata.Alternates, shapeTable, out actualBinding) ) {
shape.Metadata.ChildContent = Process(actualBinding, shape, context);
}
else {
throw new OrchardException(T("Shape type {0} not found", shapeMetadata.Type));
}
}
foreach (var frameType in shape.Metadata.Wrappers) {