Hey there - i find it strange that i could not find any approaches to my following problem:
I run an actual set of Drupal6, CCK, Imagefield, Imagecache (unluckily without .htaccess/cleanurls and therefore useless) and i want to use Imagefields:
1 - to show a cropped part of an image (188px/116px) in teaser AND full node (i not only want define the cropping points manually, but also to desaturate the image, so i chose to take care of this in photoshop)
2 - to appear in a node's teaser to click-direct the user onto the full node
3 - to appear in the full node in the same cropped form as in the teaser, but now to link onto a separate imagefield, which shows the other, full image.
4 - ideally to be combined with lightbox2 or thickbox (using 2 different fields), but this is optional.
... how would you approach to this problem? i am currently unaware of how to link those two fields. i am pretty sure it could be done in contemplate, but how would you do that exactly?
The best documented solution - to combine an imagecache "crop and scale" preset with the imagefield is no option because i want to have control over the cropping's positions/dimensions.
Comments
Comment #1
zach harkey commentedI would create two image fields for this content type:
1. field_image (this is your full image)
2. field_image_teaser (this is your custom teaser image)
Let's assume your content type is called 'foo',
If, for example, the name of your content type was 'foo', create a file named node-foo.tpl.php in your theme directory. In it, you could put something like this:
Of course my example is extremely bare bones. Your template will surely output the title and other fields. You will probably also want to provide some defaults in case the fields are empty.
Comment #2
mimhakkuh commentedFantastic - thx Zach Harkey;
I used your example the following way:
... the only thing missing is the implementation of an Imagecache preset for the fullsize image. It is still calling for the original fullsize, though, i prepares a *max-500px* preset to be used within the lightbox2 presentation.
Comment #3
quicksketchYou need to link to the ImageCache version, not the full size version.
Comment #4
quicksketchMarking fixed, please reopen if you have further questions on this topic.
Comment #6
mimhakkuh commentedJust re-opened this topic. I got stuck with the mentioned technique trying to prevent empty imagefields to be printed. I guess this is a matter of inserting the correct php to stop my template behaving like this.
I've put a detailed explanation on the matter in Zen's support request queue:
http://drupal.org/node/450862
Currently I am using the versions:
Drupal 6.10
Content Construction Kit (CCK) 6.x-2.2
FileField 6.x-3.0
ImageField 6.x-3.0
ImageCache 6.x-2.0-beta9
Lightbox2 6.x-1.9
Zen sub-theme based on 6.x-1.0
Your help is appreciated!
Comment #7
quicksketchSupport for custom theming is generally not provided in the ImageField queue, though it doesn't seem that your request is really related to this issue at all. Closing after lack of activity.