Hi,
is there an other possibility to change the default page size of DOM than changing the line:
protected $per_page = "10";
in DataObjectManger.php ?
Greetz,
Robert
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba
Hi,
is there an other possibility to change the default page size of DOM than changing the line:
protected $per_page = "10";
Greetz,
Robert
$yourDOM->setPageSize(50);
--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com
Hi UncleCheese,
thanks for your fast reply.
This method does not work for me:
if i use this method, the pulldown in the right bottom corner, where the number of displayed items can be changed, does not work anymore (using FileDataObjectManager and ManyManyDataObjectManager)
I use the DOM from SVN trunk and SS 2.4.1
Kind regards,
Robert
What does "doesn't work" mean?
You can update the values in that dropdown with $yourDOM->setPageMap(), BTW..
--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com
Hi Uncle,
$manager->setPerPageMap( array('25', '50', '75') );
works like a charm ......
sry for not explaing what happens exactly ...
if i use
$manager->setPageSize(20);
the selected value inside DOM is '10'. And if i change this value, no event (reload) is fired. Nothing happens.
(no JS Error is shown in Firebug)
BTW the DOM is used inside ModelAdmin
Thx for your help,
Robert
Ok, so using setPageMap() fixed the issue?
--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com
Hi Uncle,
this is OK for me ....
Too bad the code
$manager->setPageSize(20);
does not work for me..
Thanks a lot for your time and help,
Robert
but FileDataObjectManager is ignoring the setting
$manager->setPerPageMap( array('25', '50', '75') );
The Dropdown is correctly populated with the values 25, 50, 75, All
But there are only 10 records displayed on load ....