On a subpage I have a list of image and video files that I want to loop through in my template. They should be sorted by manual order.
However, one of the images is the “front page” image (determined via a select field in the panel) and needs to be moved to the front of the list (and therefore taken out of the manually sorted order).
How would I go about that? If possible I would like to receive one sorted list of files, so I only need to use one loop.
Yes, you could use the not() method to skip that file first, then after you have done sorting, prepend the file to the collection using $files->prepend().
Edit 2019-04-23: The above code does not work when there are no other media files apart from the cover image. I am not sure, why I thought you need a loop. All you need is this: