views:

119

answers:

2

I am currently using Drupal 7 with the Views module. I have built a photo gallery that is running properly, but I am trying to integrate a lightbox.

However, to use a lightbox I need to image links to have the 'rel' attribute. Can anyone please help me with my problem.

How do you add the 'rel' attribute in Drupal Views??

+1  A: 

As far as I am aware, you will have to do this in the theme. Override the view in your theme and add any attributes or additional HTML there.

berkes
+3  A: 

In views, click on the link for the field. You will get into the configure settings for that field. One of them is "rewrite output for this field". You can output the field as arbitrary <a> with the required rel. (You can also try using the "Output this field as a link", that has many options for link but I don't see rel there).

BTW I use views and the lightbox2 drupal module ( http://drupal.org/project/lightbox2 ) all the time in Drupal 6. Lightbox2 just works "out of the box" in Drupal 6 with Views. Consider using Drupal 6 for your needs as many modules aren't available in Drupal 7 yet.

Sid NoParrots

related questions