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   919 Views

Avatar
nzjoel

Community Member, 26 Posts

3 December 2010 at 2:44pm

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

Forum Moderator, 1798 Posts

3 December 2010 at 10:33pm

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

Community Member, 26 Posts

4 December 2010 at 10:46am

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

Forum Moderator, 1798 Posts

5 December 2010 at 1:31am

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

Avatar
nzjoel

Community Member, 26 Posts

5 December 2010 at 8:40am

That worked perfectly! Thank you very much!