I used your Testimonials example as a basis for my own Testimonials class and TestimonialsPage type. My page type first displays a random testimonial and then I have previous and next buttons that I want to page through all of the testimonials one by one. I tried using what you added to the image_gallery for next and prev albums as a basis to add this to my TestimonialsPage. However I cannot figure a way for my adjacentTestimonial() function to know the ID of the randomly selected initial Testimonial. I don't know how to set up parameters inside a class and even if I did have a parameter that would hold the Testimonial DataObject I need there is no way of making sure my currentTestimonial function runs before the NextTestimonial and PrevTestimonial functions run so that variable could very well be null and I couldn't get the ID so I could get the next or previous one from the Testimonials table.
Maybe the problem could be approached this from a completely different angle.
One more note: In your ImageGalleryPage.php file that I am using as reference for prev/next functionality, $this->current_album is set in SingleAlbumView() and tested in CurrentAlbum() however I am not sure how this works as I can't find where that is declared.