Further to this:

http://drupal.org/node/237466

which explains how to change the image caption of the lightbox popup from the alt attribute to the title of the image node...

I want to use the body text from the image node ( $node->content['body']['#value'] ) as the caption in the popup.

I've tried a number of modifications to theme_imagefield_image_imagecache_lightbox2, but nothing seems to work.

How can I do this?

thanks,

dru

CommentFileSizeAuthor
#1 lightbox2_5x_259323.patch2.5 KBstella

Comments

stella’s picture

StatusFileSize
new2.5 KB

Upgrade to the latest 5.x-2.x-dev version of the module. Then put the function in the attached file into your theme's template.php file. It should display the body teaser text in the lightbox in addition to the caption. However for long texts, it will scroll off the bottom of the page and will be very narrow for smaller images. I'm not providing any support on this as I plan to implement an alternative solution which will open the node in a lightbox.

Cheers,
Stella

stella’s picture

Status: Active » Fixed

The latest dev version now allows you to configure an image node page to be opened in the lightbox when the image is clicked, instead of the image itself.

Cheers,
Stella

druojajay’s picture

Excellent. Thanks for the speedy response!

dru

stella’s picture

Oh this was also released in 5.x-2.7 and 6.x-1.7

iantresman’s picture

I've made an Image module feature requested, and described a hack, that displays an image node's body text, as the image caption (but not in teasers), described here.

limehouse’s picture

It's great to be able to link to the image node page, but how do you remove the image filename from being displayed in the lightbox?

stella’s picture

limehouse: if this is unrelated to comments #1 or #5, please open up a separate issue.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.