Jump to content


Photo

Problem with pagination


  • Please log in to reply
3 replies to this topic

#1 buothz

buothz

    Jr. Member

  • Members
  • PipPip
  • 45 posts
  • 3

Posted 25 April 2012 - 02:36 AM

I can not understand why in this case
$yachts = $pages->find("template=newyachts, limit=3, sort=date");
foreach($yachts as $s) {
    ... }


$pagination = $yachts->renderPager();
echo $pagination;
Pagination works well...

In this case
$yachts = $pages->get("$page->path")->find("template=newyachts, limit=1, sort=date");
foreach($yachts as $s) {
    ... }

$pagination = $yachts->renderPager();
echo $pagination;
don't work... In both cases, I have activated the url -> allow pages

where is the mistake? Thank you.

#2 Soma

Soma

    Hero Member

  • Moderators
  • 3,421 posts
  • 1944

  • LocationSH, Switzerland

Posted 25 April 2012 - 02:43 AM

http://processwire.c...rkup-pager-nav/

you may want to read this again. It says any limit greater than n=1.

@somartist | modules created | support me, flattr my work flattr.com


#3 buothz

buothz

    Jr. Member

  • Members
  • PipPip
  • 45 posts
  • 3

Posted 25 April 2012 - 02:46 AM

http://processwire.c...rkup-pager-nav/

you may want to read this again. It says any limit greater than n=1.

lol! I'm an idiot! I've put only ​​one because I had only 2 items in that category..

#4 ryan

ryan

    Hero Member

  • Administrators
  • 5,985 posts
  • 3386

  • LocationAtlanta, GA

Posted 25 April 2012 - 11:12 AM

This has come up a few times, so thinking I should remove that limitation and make it so that you can still paginate with a limit=1. I'll look into this.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users