Use Injector for creating paginated list of blog posts
This commit is contained in:
parent
fbfa5e38c1
commit
f9530b5f05
|
@ -1030,7 +1030,7 @@ class Blog_Controller extends Page_Controller
|
|||
{
|
||||
$allPosts = $this->blogPosts ?: new ArrayList();
|
||||
|
||||
$posts = new PaginatedList($allPosts);
|
||||
$posts = PaginatedList::create($allPosts);
|
||||
|
||||
// Set appropriate page size
|
||||
if ($this->PostsPerPage > 0) {
|
||||
|
|
Loading…
Reference in New Issue