mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
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.
This commit is contained in:
parent
d606187ab7
commit
9e96d43e04
@ -75,7 +75,10 @@ class CommentsExtension extends DataExtension {
|
||||
$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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user