mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-22 20:13:50 +08:00
#17396: Fixing extra query string parameter when blog is home page
Work Items: 17396 --HG-- branch : 1.x
This commit is contained in:
@@ -17,6 +17,14 @@
|
||||
routeData.Remove("id");
|
||||
}
|
||||
|
||||
// HACK: MVC 3 is adding a specific value in System.Web.Mvc.Html.ChildActionExtensions.ActionHelper
|
||||
// when a content item is set as home page, it is rendered by using Html.RenderAction, and the routeData is altered
|
||||
// This code removes this extra route value
|
||||
var removedKeys = routeData.Keys.Where(key => routeData[key] is DictionaryValueProvider<object>).ToList();
|
||||
foreach(string key in removedKeys) {
|
||||
routeData.Remove(key);
|
||||
}
|
||||
|
||||
var hasNextPage = (Model.Page * Model.PageSize) < Model.TotalItemCount;
|
||||
|
||||
Model.Classes.Add("pager");
|
||||
|
Reference in New Issue
Block a user