Displaying Pager_First

Topics: Customizing Orchard
Oct 18, 2012 at 2:54 AM

I tried to display Pager_First and Pager_Last putting a line of

<span>@Model.Value</span>

in Pager_First.cshtml, and it displays the text value of the two and no links.

Can anybody tell me what I am missing here ?

Oct 21, 2012 at 11:35 PM

I solved it by providing following codes to Pager_First.cshtml.

@{
    var RouteValues = (object)Model.RouteValues;
    RouteValueDictionary rvd;
    if (RouteValues == null) {
                rvd = new RouteValueDictionary();
            }
            else {
                rvd = RouteValues is RouteValueDictionary ? (RouteValueDictionary)RouteValues : new RouteValueDictionary(RouteValues);
            }
   
    string title = Html.Encode(Model.Value is string ? (string)Model.Value : Display(Model.Value));
}
@Html.ActionLink(@title, (string)rvd["action"], rvd)