Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Change Pagination number

Go to End

3 Posts   501 Views


Community Member, 71 Posts

30 January 2014 at 4:19pm

Hey guys,

I've tried following this tutorial to get pagination working:

I've managed to get it to work and it defaults to 10 results per page, however I cannot figure out how to change that number and set it to 3 or 5 or whatever I need. I'm not sure what the code is nor where I would put it.

Anyone can help?


Forum Moderator, 1391 Posts

2 February 2014 at 2:54am

This should work:

	public function PaginatedPages() {
		return PaginatedList::create(Page::get(), $this->request)->setPageLength(3);


Community Member, 71 Posts

3 February 2014 at 4:07am

Edited: 03/02/2014 4:37am

Thank you, worked like a charm.