[英]Drupal - Use lightbox with Views (Rel attribute) - in output link
In Drupal I have two image fields, one to act as a thumbnail and the other the image that will open when the thumbnail is clicked. 在Drupal中,我有两个图像字段,一个用作缩略图,另一个是单击缩略图时将打开的图像。 The only way I could find to link the two was to use the option for "Output this field as a link" and link to the image field.
我找到链接两者的唯一方法是使用“输出此字段作为链接”选项并链接到图像字段。
This works, so when I click the thumbnail it opens the larger image however I would like to use lightbox2 for this task but in the "Output this field as a link" options there is no way to set the "rel" attribute. 这是可行的,因此当我单击缩略图时,它将打开较大的图像,但是我想使用lightbox2来完成此任务,但是在“将此字段输出为链接”选项中,无法设置“ rel”属性。
Is there a way to either set the rel attribute or invoke the lightbox by setting a class? 是否可以通过设置类来设置rel属性或调用灯箱?
you only need a single cck imagefield to get thumbnail plus full image in lightbox: Lightbox2 - How to use with CCK Imagefield and Imagecache . 您只需要一个cck imagefield即可在lightbox中获取缩略图和完整图像: Lightbox2-如何与CCK Imagefield和Imagecache一起使用 。
UPDATE : use the "Lightbox Trigger" Views field of the Lightbox2 development version . 更新 : 使用 Lightbox2开发版本 的“灯箱触发器”视图字段 。 step by step:
一步步:
[field_image_fid]
. [field_image_fid]
。 now, your view should show your thumbnail image and, clicking on it, should open your full image in a lightbox frame. 现在,您的视图应显示您的缩略图,然后单击该缩略图应在灯箱框架中打开完整的图像。 at least that's what's happening here :)
至少这就是这里发生的事情:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.