Randomizing images in a Gallery.

My database has a Themes table and an Items table such that every Item has a Theme. I’d like to allow the user to choose a Theme from a Gallery which would then navigate to another page with another Gallery displaying all Items with the chosen Theme. I have managed this on a simplistic level by binding the Gallery to the Theme table and displaying an image from a field in the table. What I would really like to do is populate the first ‘Theme’ Gallery where each Gallery item represents a Theme, but to display random images of Items associated with the given Theme such that each Gallery item presents a mini showcase for Items from that Theme. I hope that makes sense. I have a feeling that perhaps the first Gallery should maybe not be a Gallery at all. I chose a Gallery as I wanted Themes to be presented in a grid (as the number of Themes can vary). Any ideas ?

Hi,
you can use the steps below as one of the ways to achieve what you have described: