I'm not sure if this is really an ImageCache issue but is there a way to add the title attribute to the link as well as the image tag?
I'm trying to use ImageCache with Slimbox 2 and Slimbox 2 pulls the image's caption from the title attribute. However, it must be on the link and not the thumb. So instead of...
<a href="url" class="classes"><img src="url" title="caption"/></a>
I would like...
<a href="url" class="classes" title="caption"><img src="url" title="caption"/></a>
Comments
Comment #1
toovy commentedTaking a second look, I was able to get the desired behavior by changing the imagecache.module file here...
case 'imagelink':
$original_image_url = file_create_url($item['filepath']);
$imagetag = theme('imagecache', $presetname, $item['filepath'], $alt, $title);
return l($imagetag, $original_image_url, array('attributes' => array('class' => $class,'title'=>$title), 'html' => TRUE));
This doesn't seem like the best way of doing this though.
Comment #2
fizk commentedPlease reopen if this is still an issue with ImageCache 6.x-2.0-rc1.