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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Show more than 10 files per page in CMS


Reply

5 Posts   910 Views

Avatar
nzjoel

3 December 2010 at 2:44pm Community Member, 26 Posts

Hi
I find it really annoying being limited to only seeing 10 files per page in the "Files & Images" part of the CMS. Is it possible to alter the CMS someway to show more than 10 at once? It would be great to see all the images/files on one page.
Cheers
~Joel

Avatar
swaiba

3 December 2010 at 10:33pm Forum Moderator, 1796 Posts

you could add

$this->setPageSize(15);

to

cms\code\AssetTableField.php
function __construct($controller...

but this means hacking the core code - something I rarely (really never) do - but hope this helps

Avatar
nzjoel

4 December 2010 at 10:46am Community Member, 26 Posts

Hi, thanks for your reply. I have added it and this is my code below, but it hasnt changed anything. Ive done a dev/build and a ?flush=all with not success.

function __construct($controller, $name, $sourceClass, $fieldList, $detailFormFields, $sourceFilter = "", $sourceSort = "", $sourceJoin = "") {
$this->setPageSize(15);

Any ideas

Avatar
swaiba

5 December 2010 at 1:31am Forum Moderator, 1796 Posts

try at the *end* of the init function, that is where I tested it

Avatar
nzjoel

5 December 2010 at 8:40am Community Member, 26 Posts

That worked perfectly! Thank you very much!