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:
Ruud Arentsen 2012-07-26 09:40:57 +02:00
parent d606187ab7
commit 9e96d43e04

View File

@ -75,7 +75,10 @@ class CommentsExtension extends DataExtension {
$this->ownerBaseClass, 'comments_per_page' $this->ownerBaseClass, 'comments_per_page'
)); ));
$controller = Controller::curr();
$list->setPageStart($controller->request->getVar("commentsstart". $this->owner->ID));
$list->setPaginationGetVar("commentsstart". $this->owner->ID); $list->setPaginationGetVar("commentsstart". $this->owner->ID);
$list->MoreThanOnePage();
return $list; return $list;
} }