• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pagination page number issues

#1
[eluser]Unknown[/eluser]
Hi,

I've spent the entire day reading through everyone else's pagination issues but none seem to be too similar to mine.

It took me a while but I thought I had everything working. Now, however, it turns out that whatever I set $config['per_page'] to becomes the next page number in the pagination links.

E.G.

If I have 11 results in total, and am showing 10 per page the first 10 results will show fine and the pagination links will show the next page link as "2" but it will point towards /page/10/.

Similarly, if I have 11 results in total, and am showing 5 per page the first 5 results will show fine and the pagination links will show the next page link as "2" but it will point towards /page/5/. The same happens whatever I set $config['per_page'] to.

If I simply put /page/1 into the address bar, the "second" page of results shows up just fine, but the pagination links are still wrong.

I don't really want to post my code here because it's long and a little messy - I don't want to put anyone off. The only instructions I give to the pagination library are:

$config['base_url'], $config['uri_segment'] if the page number is present n the URI, $config['total_rows'] which I know is right, and of course $config['per_page'].

Have I misunderstood something here? Any assistance will be much, much appreciated Smile Thank you.

#2
[eluser]Yash[/eluser]
page number shows the last result rows and not the actual page number.

Someone posted a pagination library that shows page number in url. search for that..feeling lazy

#3
[eluser]Unknown[/eluser]
Ahhh.... I wondered why my code and the pagination never seemed to completely tie in. Many thanks.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.