This patch creates a new handler for cck fields, "Show first value only." When selected in a views field, the view will print just the first value in a multiple-value field. For example, if you're creating photo albums using a multiple-value imagefield, this allows you to show just the first picture from each album on a view listing all albums. It's a pretty simple change, but one I've needed more than once...
The patch is for content_views.inc.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | content_views_first_last_of_multiple_values_189807.patch | 4.04 KB | David Lesieur |
| content_views_inc.patch | 2.61 KB | nicholas_w |
Comments
Comment #1
amitaibuMaybe you could have used this module to show as many nodes of a referenced filed as you would like.
Comment #2
nicholas_w commentedReferenced by is undoubtedly a cool module, however, I am not using a separate node for each photo. Instead, a single node uses a mutiple-value imagefield to hold all the pics.
Comment #3
David Lesieur commentedI think this is a very useful feature. This new patch improves on the previous one:
Comment #4
yched commentedLooks cool. I'm currently reviewing this.
Comment #5
asak commentedA no-patch solution using views only: Node: Distinct filtering .
Comment #6
stella commentedThis patch worked perfectly for me.
Cheers,
Stella
Comment #7
yched commentedEr, I forgot to close this issue, but the patch made it in 5.x-1.x (and 6.x-1.x) a few months ago. Thanks David !
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #9
rimma commentedAnyone can give some suggestions how to solve this issue in Drupal 6.4 using View 6.2 dev.
Thanks in advance.
Comment #10
yched commentedThis feature is already in both D5 and D6 branches (although buggy in D6 rc6, grab latest 6.x-2.x-dev)
Comment #11
csform commentedI need to use the path but I dont know how or where to used?, Could someone help using the path please!
Thanks
Comment #12
Delta Bridges commentedI am confused as well... I am using 6.3.1 but where is the UI for this option?
Many thanks,
Comment #13
Daniel A. Beilinson commentedsubscribe :-)
Comment #14
markus_petrux commentedI don't know in D5, but support for D5 is almost on a dead end. No human resources available. If it needs a patch, then that's welcome, but I assume it is done, as suggested by yched comment in #10.
For CCK2 in D6, this is already possible as well, but it uses a different implementation than the one propossed in the patches above, that are probably D5 related, meaning the code cannot be compared because Views integration changed slightly since then.
So for CCK2 in D6, for multiple value fields in views you should use an option labelled "Group multiple values". Once this option is enable, you can choose how many values to show, starting from, and whether these values should be displayed in reversed order.
Comment #15
Daniel A. Beilinson commentedBut if I choose to show me only one value and set starting from or ending - it's not show me last value, because I create new nodes and total amount of values'll be greater and greater, so if i choose one value start from 16, when total amount of fields'll be 17 - it'll be 16 or 17, not exactly 17.
Comment #16
markus_petrux commentedThis issue is so old (started in November 2007, closed in April 2008), that I think it would be better if you could open a separate issue with as much information as possible to reproduce the problem. Thanks