|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
carllwyman Smarty n00b
Joined: 27 Apr 2018 Posts: 1
|
Posted: Fri Apr 27, 2018 7:10 pm Post subject: Smarty Pagination |
|
|
Hi guys,
I am trying to implement the PHP SmartyPaginate by Monte Ohrt. I have about 1000 records that I need to display.. I don't know how to limit the number of ranges displayed ({paginate_middle}). I am displaying 10 items per page, this means I have 100 pages and all these ranges are being displayed at ones, thus making the page untidy.. I just want to display ranges of up to 40 items and increase as needed. an example of what I want is like this: http://www.phpinsider.com/php/code/SmartyPaginate/demo/
you notice that they have 100 records but they are only displaying ranges of up to 40 items. and when you click on range [31-40], range [1-10] disapears and a new range is printed which is [41-50].. Can anyone please help me achieve this. At the moment all my ranges are being being display like this [1-10] [11-20] .. .. .. .. .. .. [941-950], how can I display only four ranges per time? |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Tue May 01, 2018 2:38 am Post subject: |
|
|
According to the docs, this will cause that limit to be used:
Code: | {paginate_middle page_limit="5"} |
This is supposed to then show, for example:
prev [150-160][161-170][171-180][181-190][191-200] next |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|