Extracting arbitrary field_image_cache image using a view with arguments?

MadOverlord - November 3, 2009 - 11:18
Project:Content Construction Kit (CCK)
Version:6.x-2.x-dev
Component:Views Integration
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

It's easy to build a view that extracts all the images associated with a node.

It's easy to build a view that extracts the first image associated with a node.

It's easy to build a view that extracts the 10th image associated with a node (or any other constant value).

But is it possible to build a view that extracts the Nth image associated with a node, where N is an argument to the views call? If so, how is it done?

Much obliged for any help that can be provided.

#1

merlinofchaos - November 3, 2009 - 15:54
Project:Views» Content Construction Kit (CCK)
Version:6.x-2.7» 6.x-2.x-dev
Component:Miscellaneous» Views Integration

Not sure. Checking with CCK folks -- I can't remember if there's a way to control which field(s) are extracted by delta or not.

#2

markus_petrux - November 3, 2009 - 16:21
Status:active» fixed

Try with latest dev snapshot. Multiple value fields expose the delta key to Views as field, filter, argument, ...

#3

MadOverlord - November 6, 2009 - 14:55

Thanks very much for the help. I managed to puzzle out how to do it once given the important clue.

Some notes for the next person trying to do this after adding a delta argument.

1) You must ensure that the Content: Image field has Group Multiple Values unchecked, otherwise you will get all the Images, not just the one you want.

2) If you set the Content: Image delta argument to allow multiple values, you can use arguments like 1+2+3, but you need to make sure that Items to Display is set to unlimited. Also, 1+2+3 and 3+2+1 both appear to display in order 1+2+3.

#4

System Message - November 20, 2009 - 15:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.