Lightbox and PHP
Has anyone tried to include the Lightbox2 using the Prototype framework to display images in a repeating region?
What I have here is a repeating table of records created with DataAssist. That all works fine. There are 3 images within each record. Right now if you click on an image thumbnail it pops up a detailed large version of the image. But then you have to close that window and click on each of the other two thumbnails one at a time to see them.
My customer wants the lightbox instead so that he can click next to see all three images in that record.
With Lightbox2 there is the rel="lightbox[group]" that allows you to show only groups with a particular name. But I can not figure out how to create this dynamically. And since the thumbnails are each in their own column of the database table, it shows the first image of each record when you click on imagethumb1.
My current code that pops up the lightbox, but shows the image1 of all records is this;
<a href="images/<?php echo $row_rsAvailable['image1']; ?>"
rel="lightbox[group]" title="<?php echo $row_rsAvailable['number']; ?>">
<img src="images/<?php echo $row_rsAvailable['image1']; ?>"
alt="Available" width="150" /></a>
So I somehow need to first echo all images in that record (image1, image2, image3). Then I need to pass the group name in the form of the id of that record. Any thoughts on doing this?
Thanks,
TroyD