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.

Form Questions /

SearchForm - Set the page length


Reply


2 Posts   1297 Views

Avatar
Monty

Community Member, 19 Posts

6 February 2011 at 6:52pm

Hi all.

Quick question - In the SilverStripe book it says you can adjust the number of results the search form returns. By default it is 10. It says to use the method SearchForm->setPageLength().

So how would I do this exactly. Thanks for your time.

Monty.

Avatar
swaiba

Forum Moderator, 1799 Posts

9 February 2011 at 9:38am

in Page.php...

function init() {
...
//towards the end
$this->setPageLength(20);
...
}

i think