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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

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

SearchForm - Set the page length


Go to End


2 Posts   2236 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, 1899 Posts

9 February 2011 at 9:38am

in Page.php...

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

i think