Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 9e96d43e04511eb77dd530fd4c65915bc5224dab 1 parent d606187
@roed roed authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  code/extensions/CommentsExtension.php
View
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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.