I've a view in Drupal and each item has a title and an image in its te开发者_如何学Goaser.
Now.. I want to add a lightbox with next / prev buttons to display all the images in big resolution.
I was wondering if "Next and Prev" functionalities work for the images of each node.
So far I've only used a lightbox to display galleries in multiple CCK fields in a single node. And I'm not sure if the lightbox can detect the images of a specific image field in each node and display them as slideshow.
Thanks
There are a bunch of different Lightbox plugins (I think Colorbox is the recommended one this month), and they all generally work on the same principle when it comes to slideshows. As long as every image/link has the same rel
attribute, it doesn't matter where they are on the page: they will be grouped in the same slideshow. Example:
<p><a href="pic1.jpg" rel="example1" title="Photo 1">Grouped Photo 1</a></p>
<!-- tons of markup here -->
<p><a href="pic2.jpg" rel="example1" title="Photo 2">Grouped Photo 2</a></p>
<p><a href="pic3.jpg" rel="example1" title="Photo 3">Grouped Photo 3</a></p>
So, you'll need to modify the content template (in the case of ImageField) or the field templates (in the case of Views) and add the rel
grouping tag in.
精彩评论