I have a new client that nicely coincides with the release of SS3 so I am converting the existing site from SS2.4. At one point, I want to show just the first 3 images from a gallery, rather than all the images. I'm guessing that this is a simple extension of the normal datalist syntax but I can't find it. Can someone offer a solution?
return DisplayAnythingFile::get()->filter(array('GalleryID' => $this->ImageGalleryID))->sort(array('Sort'=>'ASC'));
For extra points, I have another site where I'd like to retrieve a random 3 images from a gallery. I'm happy to just have a random starting point and retrieve the next 2 consecutive images. Any ideas?