mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
@@ -263,26 +263,24 @@ namespace Orchard.Core.Shapes {
|
||||
IDictionary<string, string> attributes = Shape.Attributes;
|
||||
var zoneWrapper = GetTagBuilder("div", id, classes, attributes);
|
||||
Output.Write(zoneWrapper.ToString(TagRenderMode.StartTag));
|
||||
foreach (var item in ordered_hack(Shape))
|
||||
foreach (var item in Order(Shape))
|
||||
Output.Write(Display(item));
|
||||
Output.Write(zoneWrapper.ToString(TagRenderMode.EndTag));
|
||||
}
|
||||
|
||||
[Shape]
|
||||
public void ContentZone(dynamic Display, dynamic Shape, TextWriter Output) {
|
||||
foreach (var item in ordered_hack(Shape))
|
||||
foreach (var item in Order(Shape))
|
||||
Output.Write(Display(item));
|
||||
}
|
||||
|
||||
[Shape]
|
||||
public void DocumentZone(dynamic Display, dynamic Shape, TextWriter Output) {
|
||||
foreach (var item in ordered_hack(Shape))
|
||||
foreach (var item in Order(Shape))
|
||||
Output.Write(Display(item));
|
||||
}
|
||||
|
||||
#region ordered_hack
|
||||
|
||||
private static IEnumerable<dynamic> ordered_hack(dynamic shape) {
|
||||
public static IEnumerable<dynamic> Order(dynamic shape) {
|
||||
IEnumerable<dynamic> unordered = shape;
|
||||
if (unordered == null || unordered.Count() < 2)
|
||||
return shape;
|
||||
@@ -317,8 +315,6 @@ namespace Orchard.Core.Shapes {
|
||||
return ordering.Select(ordered => ordered.item).ToList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
[Shape]
|
||||
public void HeadScripts(dynamic Display, TextWriter Output) {
|
||||
WriteResources(Display, Output, "script", ResourceLocation.Head, null);
|
||||
|
Reference in New Issue
Block a user