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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Hiding pagination controls and setting results per page in DataObjectManager


Go to End


2 Posts   1853 Views

Avatar
timwjohn

Community Member, 98 Posts

20 March 2010 at 2:31pm

Edited: 20/03/2010 2:46pm

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

Avatar
timwjohn

Community Member, 98 Posts

21 March 2010 at 4:27am

Edited: 21/03/2010 5:05am

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