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.

All other Modules /

Discuss all other Modules here.

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

SortableFile Module - Specifically SortableUploadField - Admin Section Pagination


Go to End


2 Posts   1610 Views

Avatar
Sajan

Community Member, 13 Posts

6 February 2016 at 12:50am

Edited: 06/02/2016 12:52am

Hi guys,

Im fairly new to Silverstripe so this maybe a bit of a noob question...

I am creating a module where I can upload images using (SortableUploadField) in the admin section and then drag and drop to change the SortOrder thanks to the https://github.com/bummzack/sortablefile module. These images are then displayed on the front end of the website.

The issue I am having is when I upload say 20 images they all display in a long list in the admin section and is slowing down loading times and efficiency. is there a way to paginate the uploaded images in the admin section to say display 10 at a time? But using the SortableFile module rather than the SortableGridField module as that one wasn't working as needed

And secondly, is there also a way to keep the uploadfield at the top of the page rather than the bottom so the user does not have to scroll down to the end every time?

Thanks in advance,
Sajan :)

Avatar
ntd

Community Member, 9 Posts

9 June 2016 at 9:53am

Edited: 09/06/2016 9:54am

Hi sajan.

...is there a way to paginate the uploaded images in the admin section to say display 10 at a time?

No, you can't. If you want pagination you should use a GridField.

... is there also a way to keep the uploadfield at the top of the page ...

If you are short in screen space it would be much better to put that list on its own tab. Anyway when you add the field (with addFieldToTab I suppose) you can leverage the third parameter.