Posted by: slvramesh on: May 10, 2010
Problem definition:
Drupal is the best CMS with building media related sites. Galleria is the best module for image gallery in drupal, the galleria module did not support caption when you use image filefield because the gallery module get caption for field description. When you use filefield it is support title and alt input field.
So here is the solution for getting caption for image in title tag.
1) In the content type manage fields enable alt and title tags.
2) Add the following coding in your galleria.module file function theme_galleria_formatter_imagefield_galleria end the “alt” text.
‘title’ => $element[$key]['#item']['data']['title']
3) Replace the coding in the function “template_preprocess_galleria”
$caption = ($image->title != $image->filename) ? $image->description : ”;
to
$caption = ($image->title != $image->filename) ? $image->title : ”;
Now view your galleria image gallery, caption will dispaly.
Cheers!
nice tutorial…. thanx for share
What versions? Not working with Drupal 6.2 and Galleria 1.x-dev.
Has something changed?
$caption = ($image->title != $image->filename) ? $image->description : ”;
is not present in Galleria 1.0
Nice tutorial. Do you know how to implement Galleria on Drupal 7?
May 12, 2010 at 5:54 pm
Thanks a lot for the Drupal tutorial, you prefer Drupal in comparison to Joomla and WordPress?
May 13, 2010 at 4:17 am
Yes, Drupal is the best CMS compare to joomla and wordpress.