Jump to:

2002 Posts in 1422 Topics by 616 members

Form Questions

SilverStripe Forums » Form Questions » SearchForm - Set the page length

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

Page: 1
Go to End
Author Topic: 1239 Views
  • Monty
    Avatar
    Community Member
    19 Posts

    SearchForm - Set the page length Link to this post

    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.

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: SearchForm - Set the page length Link to this post

    in Page.php...

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

    i think

    1239 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.