Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Hiding pagination controls and setting results per page in DataObjectManager

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1264 Views
  • timwjohn
    Avatar
    Community Member
    98 Posts

    Hiding pagination controls and setting results per page in DataObjectManager Link to this post

    Hi,

    How do you set results per page to default to 'All'. setPageSize() isn't having an effect with me, and anyway, you'd have to specify a finite number right? [Edit: Just discovered that 'All' actually shows 9999 per page]

    If the above is possible I would also like to hide the pagination controls. Again setShowPagination() doesn't seem to work...

  • timwjohn
    Avatar
    Community Member
    98 Posts

    Re: Hiding pagination controls and setting results per page in DataObjectManager Link to this post

    Ok, so setting

    $my_dom->setUseViewAll(true);
    $my_dom->setPerPageMap(array(9999));
    $category_manager->setPageSize(9999);

    will set 'All' as the only option for results per page, and default to it.

    It seems setPageSize does work, but the set value will not reflect in the results per page dropdown, and it also seems to override any choice you make in the dropdown.

    I'm gonna stick a request in the Feature Requests thread now...

    1264 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.