Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty Pagination

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
carllwyman
Smarty n00b


Joined: 27 Apr 2018
Posts: 1

PostPosted: Fri Apr 27, 2018 7:10 pm    Post subject: Smarty Pagination Reply with quote

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
View user's profile Send private message
bsmither
Smarty Elite


Joined: 20 Dec 2011
Posts: 322
Location: West Coast

PostPosted: Tue May 01, 2018 2:38 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP