Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there a way I can display only one of the attached images in my node layout? I'm using a CCK image file field with up to 5 images.
I do see my imagecache presets... I don't see how to grab only one of these, or a particular item in the array? I could write some custom php and node_load() but this seems like a lousy way to format content.
Thanks for any help!
Comments
Comment #1
that0n3guy CreditAttribution: that0n3guy commentedYou can use a view with nid argument. The view would show 1 or all of the images in the node (or use view_cycle module to rotate them). Add that view to your node-panel and pass the node argument to the view.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commented#1 sounds like a good answer.
Comment #4
lpalgarvio CreditAttribution: lpalgarvio commentedturning into a feature request.
instead of adding Views overhead with a views content pane, how about adding code similar to what Views has for handling Field indexes?
so that we can say how many rows to fetch, and at which index to start retrieving them.
better yet, for any kind of Field.
Comment #5
japerryThere is a delta in d7, but not d6. not backporting.