#18720: Fixing shape tracing issue with Projection pager

Work Item: 18720

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-06-30 11:13:50 -07:00
parent b224aa0ed1
commit aa7360b94e
2 changed files with 13 additions and 5 deletions

View File

@@ -562,10 +562,18 @@ namespace Orchard.Core.Shapes {
}
[Shape]
public IHtmlString Pager_Link(dynamic Shape, dynamic Display) {
Shape.Metadata.Alternates.Clear();
Shape.Metadata.Type = "ActionLink";
return Display(Shape);
public IHtmlString Pager_Link(HtmlHelper Html, dynamic Shape, dynamic Display, object Value) {
var RouteValues = (object)Shape.RouteValues;
RouteValueDictionary rvd;
if (RouteValues == null) {
rvd = new RouteValueDictionary();
}
else {
rvd = RouteValues is RouteValueDictionary ? (RouteValueDictionary)RouteValues : new RouteValueDictionary(RouteValues);
}
string value = Html.Encode(Value is string ? (string)Value : Display(Value));
return @Html.ActionLink(value, (string)rvd["action"], (string)rvd["controller"], rvd, null);
}
[Shape]