Hi there,
I have a class called PostalCodes that stores all the postal codes details.
In the PostalCodes.php file i have set up the PaginatedList function so that my .ss template displays the list of postal codes with pagination included. This is working well and currently looks like this:
public function PaginatedPages() {
return new PaginatedList(PostalCodes::get(), $this->request );
}
What i need to do is customise the function so that it displays 30 records at a time and not the default 10.
From the API documentation i gathered that i must put the method in an array like this:
public function PaginatedPages() {
$request = array(
'getPageLength ' => '30',
);
return new PaginatedList(PostalCodes::get(), $this->request );
}
It is not working. Any help would be great
Thanks