Closed (works as designed)
Project:
ImageCache
Version:
6.x-2.0-beta9
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2009 at 16:06 UTC
Updated:
15 Aug 2011 at 16:58 UTC
When using in views, I think that node's title should be added as link's title attribute when choosing "image linked to node".
Comments
Comment #1
anrikun commentedSo far, the solution I found:
- add "Node title" as the *first* field of the view and check "Exclude from display".
- In imagecache.module, replace line 697:
return l($imagetag, $path, array('attributes' => array('class' => $class), 'html' => TRUE));
by:
return l($imagetag, $path, array('attributes' => array('class' => $class, 'title' => $element['#node']->node_title), 'html' => TRUE));
Ugly quick patch... Is there a better way?
Comment #2
ratinakage commentedBump.
I know this was from 2 years ago but I'm facing the same issue. Anyone know a work-around which doesn't involve hacking Imagecache?
Thanks!!
Comment #3
sandrewj commentedThe views interface allows you to do this fairly easily.
Add both node:path and node:title to your view, and exclude from display if desired
set the image to display as "image" and not "image linked to node"
on the image choose the check box "output this field as a link"
use replacement patterns for the path and alt/title
The current behavior I think is preferred.