Hi,
I’m trying to set up a gallery using the following folder structure:
/content
/01-project_a
/01-album_a
image1.jpg
image1.jpg.txt
image2.jpg
image2.jpg.txt
/02-album_b
image1.jpg
image1.jpg.txt
image2.jpg
image2.jpg.txt
image3.jpg
image3.jpg.txt
/02-project_b
The main goal is to grab all images from album_a and album_b and sort them by the date they’ve been uploaded/edited. Is this even possible to achieve? Using something like
<?php foreach($page->children()->images()->sortBy('modified', 'desc') as $picture): ?>
always causes a fatal error. What would I have to do to achieve this?
Thanks in advance for your help.