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

anrikun’s picture

So 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?

ratinakage’s picture

Bump.

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!!

sandrewj’s picture

Status: Active » Closed (works as designed)

The 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.