View previous topic :: View next topic |
Author |
Message |
__fabrice Smarty Rookie
Joined: 13 Jan 2005 Posts: 18
|
Posted: Thu Feb 24, 2005 9:08 am Post subject: [SOLVED] Max of links in SmartyPaginate ? |
|
|
Hi everbody,
I have a question about 'Smarty Paginate'. Can I set a 'max' value' for links to show ?
Example
Code: | $maxvalues=3;
prev [0-10] [11-20] [21-30] ... ... next
$maxvalues=5;
prev [0-10] [11-20] [21-30] [31-40] [41-50]... ... next
|
I have a lot of links and my htlm page is over
Thanks
Fabrice
Last edited by __fabrice on Tue May 24, 2005 1:58 pm; edited 1 time in total |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Feb 24, 2005 2:42 pm Post subject: |
|
|
This functionality is not there yet... but in progress. |
|
Back to top |
|
__fabrice Smarty Rookie
Joined: 13 Jan 2005 Posts: 18
|
Posted: Thu Feb 24, 2005 2:49 pm Post subject: |
|
|
ok
And when can U add this function,please ?
Regards,
Fabrice |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Feb 24, 2005 8:46 pm Post subject: |
|
|
As soon as you send me the patch I have no date set for having it done. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Feb 24, 2005 10:03 pm Post subject: |
|
|
OK surprise, I have been working on this since yesterday, I have something working committed to CVS. You can do this:
{paginate_middle page_limit="5"}
That will limit the display to five groups of pages. There are also two other new template functions:
{paginate_first}
{paginate_last}
You can probably figure those out. |
|
Back to top |
|
__fabrice Smarty Rookie
Joined: 13 Jan 2005 Posts: 18
|
Posted: Thu Feb 24, 2005 10:20 pm Post subject: |
|
|
it's great
I'm gonna to test this tomorrow and i 'call you back'
Thanks.
Fabrice |
|
Back to top |
|
__fabrice Smarty Rookie
Joined: 13 Jan 2005 Posts: 18
|
Posted: Fri Feb 25, 2005 4:08 pm Post subject: |
|
|
Hi,
Ok, but... how can I do to do this ? , I don't understand...
I never work with CVS.
Thanks a lot.
Fabrice |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
__fabrice Smarty Rookie
Joined: 13 Jan 2005 Posts: 18
|
Posted: Fri Feb 25, 2005 11:22 pm Post subject: |
|
|
Hi,
I just test this,ok, it's fine ... but .... the "first" and "last" is in english, and my site is multi-langage .
I also notice a bug (i think ), example :
1°)first - [1-50][51-100][101-150][151-200][201-250] - last => [1-50] is set
2°)first - [1-50][51-100][101-150][151-200][201-250] - last => [51-100] is set
3°)first - [1-50][51-100][101-150][151-200][201-250] - last => [101-150] is set
4°) if I click on [151-200], look :
first - [26-75][76-125][126-175][176-225][226-275] - last => ??? nothing is set
Thanks
Fab |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Sat Feb 26, 2005 3:38 pm Post subject: |
|
|
You can change the text two ways:
SmartyPaginate::setFirstText('first');
Or
{paginate_first text="first"}
I don't seem to have that problem with the pagination, I'll look some more. |
|
Back to top |
|
gman Smarty Rookie
Joined: 27 Feb 2005 Posts: 5
|
Posted: Sun Feb 27, 2005 5:27 am Post subject: |
|
|
Hi,
The page_limit function is a great idea. I just tried it and when using format=page with page_limit, the pagination incorrectly starts at zero.
eg:
{paginate_prev} {paginate_first} {paginate_middle format="page" page_limit="5"} {paginate_last} {paginate_next}
produces:
prev first [0][1][2][3][4] last next
Shouldn't it be:
prev first [1][2][3][4][5] last next
??? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Feb 28, 2005 4:55 pm Post subject: |
|
|
Problem with [0] page is fixed in CVS. Thanks! |
|
Back to top |
|
__fabrice Smarty Rookie
Joined: 13 Jan 2005 Posts: 18
|
Posted: Mon Feb 28, 2005 5:26 pm Post subject: |
|
|
and the other problem that i show you ?
Fabrice |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
__fabrice Smarty Rookie
Joined: 13 Jan 2005 Posts: 18
|
Posted: Mon Feb 28, 2005 6:56 pm Post subject: |
|
|
It's ok..., perfect
Thanks.
Fabrice |
|
Back to top |
|
|