Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 authored July 26, 2012

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  code/extensions/CommentsExtension.php
3  code/extensions/CommentsExtension.php
@@ -75,7 +75,10 @@ public function Comments() {
75 75
 			$this->ownerBaseClass, 'comments_per_page'
76 76
 		));
77 77
 
  78
+		$controller = Controller::curr();		
  79
+		$list->setPageStart($controller->request->getVar("commentsstart". $this->owner->ID));
78 80
 		$list->setPaginationGetVar("commentsstart". $this->owner->ID);
  81
+		$list->MoreThanOnePage();
79 82
 
80 83
 		return $list;
81 84
 	}

0 notes on commit 9e96d43

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