Hi,
I hope this is the right place for this request.
I am making a gallery using CCK + Imagefield + Imagecache + Views, but I can't figure out how to the thumbnails link to the image node.
I use views to generate gallery pages based on taxonomy, and would then like these thumbnails to be clickable, however in views the only options for displaying the image are 'Default' and 'Thumb'. Would it be possible to also have a 'Thumb with link to node' option?
Thanks,
Mikkel
Comments
Comment #1
NaX commentedI also needed the imagecache images in my views to be clickable to the node. So I did some hacking.
It took me a while because I don’t really know exactly how CCK works with views, but I found a way to do it.
What this does is it adds a duplicate field option for each imagecache namespace to your view field options.
EG.
my_thumb
my_thumb, with node link
If somebody gave this a little love they could maybe do it in a better way and create a patch to a much needed feature.
Please note I had to clear my cache and refresh my view many times before the new option appeared in the dropdown.
See from line 552 in your imagefield.module file. (imagefield.module,v 1.30.2.7)
Hope somebody finds this useful.
Comment #2
quicksketchI think you re-implemented something that already exists. Try the latest dev version (though I thought it was in 1.1). This "as link" formatter already exists for every imagecache preset.
Comment #3
NaX commentedThanks.
You are correct. I upgraded to the dev version of the imagefield and imagecache and now the as link formatter is there, no problem.
The only thing that confused me for a while was what format / display setting was used for what.
EG.
If you create a view as a table list then it use the value set in the view fields section.
If you create a view as a teaser list then it use the value set in the CCK Display fields section.
I think this is incorrect as you should be able to create multiple teaser views of the same node type with different display settings. IE views display settings should override CCK display settings.
My only Question now is. Are the DEV version of imagefield and imagecache stable for production use and how far are we from the next stable release.
Comment #4
quicksketchThe problems you describe all deal with views or CCK, not imagefield directly. The 1.x dev versions of both imagefield and imagecache are reasonably stable and could be used for production and switch back to 1.2 when it's released. Most of the new features (and bugs) are going into the 2.x releases, which I wouldn't recommend for production use.
Comment #5
NaX commented@ quicksketch
I understand that the problem with the display settings is with CCK and Views. Do you know if those projects are aware of the problem? Would you suggest that I submit an issue about the problem?
Once you have read this and / or replied you can close this issue, unless you want to leave it open for the user the posted the issue.
Thanks for the help.
Comment #6
joshk commentedI was unable to find this in either development release. The relevant code appears as follows:
I'm trying to build a view with clickable images, which is a pretty basic use case. Let me know if/where a patch might be welcome.
Comment #7
j0k3z commentedSo is this possible now? Its really annoying to have a thumnail in the view table that cant be clicked
Comment #8
ericpughI've made the items clickable by doing the following: (even with the "image as link" option in views the thumbnails weren't clickable because I'm also using Content Templates.)
In the content template I used the "read more" variable as the href for the image. like this:
Kind of an odd way to do it, but it is working well... thought it might help somebody
Comment #9
deanosrs commentedSo with the "as link" we can link to the node that the image belongs to - but is there a way to just link to the actual image?
Comment #10
catchThis is fixed now with the "as link" option.
With linking to the image, I'd suggest thickbox or similar - which is supported by views/imagefield/imagecache.
Comment #11
(not verified) commentedComment #12
gmarcotte commentedthe as link formatter?? where is that? not in the imagecache preset edits, not in view row format.
I am using rotor module and want to simply link the image to the node (basic function should be easy to do)