Drupal - 将灯箱与视图(Rel 属性)一起使用 - 在输出链接中
在 Drupal 中,我有两个图像字段,一个用作缩略图,另一个是单击缩略图时将打开的图像。我能找到链接两者的唯一方法是使用“将此字段输出为链接”选项并链接到图像字段。
这是可行的,所以当我单击缩略图时,它会打开更大的图像,但是我想使用 lightbox2 来完成此任务,但在“将此字段输出为链接”选项中,无法设置“rel”属性。
有没有办法设置 rel 属性或通过设置类来调用灯箱?
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. 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.
Is there a way to either set the rel attribute or invoke the lightbox by setting a class?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需要一个 cck 图像字段即可在 lightbox 中获取缩略图和完整图像: Lightbox2 - 如何与 CCK Imagefield 和 Imagecache 一起使用< /a>.
更新:使用 “http://drupal.org/node/172953”rel="noreferrer">Lightbox2 开发版本。一步一步:
[field_image_fid]
。现在,您的视图应该显示缩略图,单击它,应该在灯箱框架中打开完整图像。至少这就是这里发生的事情:)
you only need a single cck imagefield to get thumbnail plus full image in lightbox: Lightbox2 - How to use with CCK Imagefield and Imagecache.
UPDATE: use the "Lightbox Trigger" Views field of the Lightbox2 development version. step by step:
[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 :)