Example #1
0
            internal CmsPagerBuilder(IFrontHtmlHelper html, IPagedList pageList,
                PagerOptions pagerOptions, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes)
                : base(html.Html, null, null, pageList, pagerOptions, null, routeValues, htmlAttributes)
            {
                frontHtml = html;
                this.routeValues = routeValues ?? new RouteValueDictionary();

                _pageList = pageList;
                this._pagerOptions = pagerOptions;
            }
Example #2
0
        //Optional parameter does not support NVelocity
        public static IHtmlString Pager(this IFrontHtmlHelper frontHtml, object model, object routeValues, PagerOptions options, object htmlAttributes)
        {
            options = options ?? new PagerOptions();

            //if ((model is DataRulePagedList))
            //{
            //    options.PageIndexParameterName = ((DataRulePagedList)model).PageIndexParameterName;
            //}

            var pagedList = (IPagedList)model;

            var builder = new CmsPagerBuilder
             (
                 frontHtml,
                 pagedList,
                 options,
                 RouteValuesHelper.GetRouteValues(routeValues),
                 RouteValuesHelper.GetRouteValues(htmlAttributes)
             );
            return new HtmlString(builder.RenderPager().ToString());
        }
Example #3
0
 public static IHtmlString Pager(this IFrontHtmlHelper frontHtml, object model, PagerOptions options)
 {
     return Pager(frontHtml, model, null, options, null);
 }