|
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 |
NeXXt Smarty Rookie
Joined: 22 May 2005 Posts: 25
|
Posted: Tue Jun 07, 2005 5:26 pm Post subject: [SmartyPaginate] Wrong Page count, Page missing |
|
|
Ok. I have 56 News items. 5 Items on each page.
{$paginate.page_total} gives me 12 Pages. if I click on {paginate_last} He jumps to page 11 and the Page 11 in {paginate_middle} is not linked (I think this Page 11). But {$paginate.page_current} shows me the current is page 12 and Ive got 2 news items (the oldest).
If I Click on page 10. Then current shows me Iam on 11 but paginate_middle tells me Iam on page 10
If I Click on page 9. Then current shows me Iam on 10 but paginate_middle tells me Iam on page 9
...
If Iam on page 1 and click {paginate_next}. Iam on page 2 and paginate_middle show me the same. I click on next again...till Iam on page 11 and there is no page 12 (But total is 12) an but I can click on Next then iam on page 12 but it isnt in paginate_middle (It shows me 1 newsentry)
I Think It counts wrong. Page 1 link last=55 but if I click through till page 11 it shows next=56
Template
Code: | {$paginate.page_current} / {$paginate.page_total}
{paginate_first}
{paginate_prev}
{paginate_middle format="page" prefix="" suffix="" link_suffix=" " page_limit="5"}
{paginate_next}
{paginate_last} |
|
|
Back to top |
|
NeXXt Smarty Rookie
Joined: 22 May 2005 Posts: 25
|
Posted: Tue Jun 07, 2005 7:12 pm Post subject: |
|
|
I tested it again Ive got 56 items with page limit 4 -> It works without missing link or something. no erros or else
I tested it with 55 items and page limit 5 and it works fine, too
Ive add one new item 57 items total an page limit 5 -> on last page 12 is missing again
58, 59 page limit 5 -> 12 is missing
now Ive got 60 item limit 5 and ive got page 12
Maybe I can help with my experiments if its a bug or something. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Jun 07, 2005 7:26 pm Post subject: |
|
|
See if you can take the simple example that ships with SmartyPaginate and get the same behavior. |
|
Back to top |
|
NeXXt Smarty Rookie
Joined: 22 May 2005 Posts: 25
|
Posted: Wed Jun 08, 2005 7:28 pm Post subject: |
|
|
If have used the demo code with
Code: | SmartyPaginate::setLimit(5);
$_data = range(1, 56); |
and the same problem happens! |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Jun 08, 2005 9:30 pm Post subject: |
|
|
I take the vanilla example, change those two parameters and it works fine. All the numbers are present (?) |
|
Back to top |
|
NeXXt Smarty Rookie
Joined: 22 May 2005 Posts: 25
|
Posted: Thu Jun 09, 2005 2:28 pm Post subject: |
|
|
Hm...what should we do? It goes till 60 items then Page 12 appears. Its ok its not a critical problem. Thanks for help. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Jun 09, 2005 3:24 pm Post subject: |
|
|
Make sure you are using the latest release, or even grab CVS. Otherwise I'm not sure what to make of it, works for me |
|
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
|