Hello,

I'm using ImageFields and ImageCache to allow members to upload images to a node.. They are essentially allowed to upload as many images as they can, so it becomes a gallery of sorts. This is all great and all, as my presets generate the sizes fine and display them good through a custom view through Views.

However, I want to use specifically one of the images (probably the first one uploaded) and crop and scale it with another preset and use it as a main display picture for the node. If I do this simply through Views, I will have all my images cropped and also displayed through the new preset sizes as well, rather than it limited to 1.

Does anybody know of any current snippets or existing instructions on how to achieve this? I've been looking around for days and haven't found a solution.

Cheers,
D.

Comments

dopry’s picture

Status: Active » Closed (fixed)

Somewhere there are snippets for that... I normally override a theme function and

print $node->field_myimagefield[0]['view']; or print theme('imagecache_image', $presetname, $node->field_myimagefield[0]);

mr_dimsum’s picture

Status: Closed (fixed) » Active

Isn't that just the traditional way of calling an image? What I meant from the original inquiry is that I have a views made in Views that is set to display the fields for my images under the particular presets from ImageCache, which is totally fine.. But I want to output or extract the first image uploaded in a seperate spot on the node page and use it the main image to represent the node gallery I am doing.

dopry’s picture

Status: Active » Closed (fixed)

yeah... you will have to theme your view... The feature you're asking for isn't currently supported. It could possibly implemented as a formatter...

mrsimonelliott’s picture

did you find an answer to your problem? I have the same query.

radj’s picture

still nothing?

doublejosh’s picture

(this solution only works if you're using table or list view)

  • Go to your view and check out the Fields section
  • If you've added the image field, check out the select drop down for Handler
    • Group multiple values make sure all image are together in one item.
    • Do not group multiple values means each image will create a separate instance of the node in the view.
    • Show first value and Show last value are pretty self explanatory (suppose this may be new in my version of Views)

Definitely done the node-type.tpl.php override solution mentioned by dopry. But once you go down that path display automation dwindles.