Paging in a custom Module

Topics: Writing modules
Aug 7, 2012 at 11:25 AM


I have written a custom module that connect to Microsoft Dynamics NAV, gets some data and returns it within my controller, I have then been able to figure out how to get the paging to work, my only issue is that the paging controls just render 'Older', then when I click that it also show 'Newer'.

I was expecting it to show page numbers... have I missed something or do I have to do this myself - and if so any pointers.

So far enjoying working within Orchard and learing it!



Aug 7, 2012 at 1:12 PM

var pager = new Pager(_siteService.GetSiteSettings(), pagerParameters);

CustomShape.Content.Add(Shape.Pager(pager).TotalItemCount(totalCount), "Content:after");

And limit your items with pager.GetStartIndex(), pager.PageSize


Aug 8, 2012 at 11:38 AM

I know what you mean, but I was more interested in how to render it differently.

Found something here for anyone else that might come across this...