On my full node I display a 200px width preview of an image, generated via an Imagecache preset. Is it possible to link this to another Imagecache generated preset ( say 400px wide ), rather than just to the original image which may be very, very large ?
Thanks
Dave
Comments
Comment #1
ScarabMonkey commentedthe lightbox module adds this functionality very nicely using either views or the cck node display options...
http://drupal.org/project/lightbox2
Comment #2
quicksketchNot as far as I know. There might be some other module that provides this sort of functionality, but this functionality is not (and will not be) provided by ImageField or ImageCache. Imagine if you had 10 ImageCache presets, then you had a formatter option for linking every preset to a different preset. You'd end up with 100 different "presetA linked to presetB" formatters.
In order to do what you're describing, I'd recommend just theming your node.tpl.php file, but that's a little out of scope for the ImageField queue.
Comment #3
quicksketchIn my ongoing attempt to clean the ImageField queue, I'm marking as closed. Please reopen if you have further questions on this topic.
Comment #4
cj-a-min commentedStumbled across this looking for something else, figured I would would show the next stumbler, on what worked for me in D6. As quicksketch, pointed out you can do it on your node.tpl.php like so:
This was derived from the imagecache, function theme_imagecache_imagelink.
Works in cohesion with all other modules which implement hook theme.
Alternately, if you are going to use it a lot, or are going to have different variations of it, I would suggest creating a new function in a custom module. Than calling the function, from any custom node.tpl.php.
Also make a note that [0], can be turned into a [$var], then do a for each statement so you can do all the thumbnails/images attached to the node; like a gallery.
Hope that helps.