sandari Posted January 30, 2013 Share Posted January 30, 2013 i am sure the logic for this is quite simple. I just cannot see it. My pagination works relly well, too well in fact. I have a file that displays 10 records at a time. However, the pagination dispalys all 1643 page numbers. How do I limit the display to just 3 or 4 page numbers with ellipsis each side after moving beyond the initial 3 or 4 pages? Link to comment Share on other sites More sharing options...
HartleySan Posted January 30, 2013 Share Posted January 30, 2013 My pagination works relly well, too well in fact. Hehe! That made me laugh. If you, for example, want to display three pages on each side, you need to check the difference between the current page number and both 1 (the first page) and the total number of pages (the last page), and if there are more than three pages on either or both sides, you need to create links for those three pages as well as create arrow links or whatever for the pages beyond that. One thing I would encourage though is to allow users to freely enter a number for quickly jumping to a particular page. It helps a lot when there are a lot of results. You might also want to consider letting users select the number of results per page (e.g., 10, 20 or 50). Link to comment Share on other sites More sharing options...
sandari Posted January 30, 2013 Author Share Posted January 30, 2013 Thanks. I'll try that. Link to comment Share on other sites More sharing options...
Recommended Posts