Skip to content
Browse files

fixed pagination

for me, pagination worked when i added this code. somehow, the list
didn't get the getvar and always remained on the first page. The
$list->MoreThanOnePage() fixes an issue where the links didn't appear in
the template.
  • Loading branch information...
1 parent d606187 commit 9e96d43e04511eb77dd530fd4c65915bc5224dab Ruud Arentsen committed Jul 26, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 code/extensions/CommentsExtension.php
3 code/extensions/CommentsExtension.php
@@ -75,7 +75,10 @@ public function Comments() {
$this->ownerBaseClass, 'comments_per_page'
+ $controller = Controller::curr();
+ $list->setPageStart($controller->request->getVar("commentsstart". $this->owner->ID));
$list->setPaginationGetVar("commentsstart". $this->owner->ID);
+ $list->MoreThanOnePage();
return $list;

0 comments on commit 9e96d43

Please sign in to comment.
Something went wrong with that request. Please try again.