I’m having issues excluding and including certain file names in a loop.
In the collection of files (images and videos) I have a poster image for each video. To match them i’m using the following filename structure:
video: myVideo.mp4, mySecondVideo.mp4
poster: myVideo.poster.gif, mySecondVideo.poster.gif
[...the rest of images]
How would you exclude anything .poster from showing as image (first if) and include a matching filename for video (second if) - in case there are two or more videos with different names.
If you manually reorder files in the Panel, Kirby adds a sorting number to the meta data file. You have to sort your files by that number in your template then: