Hello, first- thanks for this fantastic module!

Now, my problem: I would like to display the Title of an image as the caption because the Title allows for much lengthier captions than the description field.

Looking at the code of the module, it seems that line 291 of galleria.module is what I would want to modify:

$caption = ($image->description != $image->filename) ? $image->description : '';

Any ideas on what I could swap out "description" with? In my node.tpl.php file, I can use print $node->field_image[i]['data']['title'] and it will display the Title field of the image. That doesn't work here. Is there an easy way to do this?

Thanks in advance for any help.

Comments

kostajh’s picture

Title: Change field rendered as the caption » Change the caption to display the Title of an image
kostajh’s picture

Status: Active » Fixed

Fixed. Didn't look far enough in the file.

Change line 392 from
'description' => $element[$key]['#item']['data']['description'],
to
'description' => $element[$key]['#item']['data']['title'],

It would be cool to have this as an option in the module itself farther down the road.

Status: Fixed » Closed (fixed)

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