Allow filtering by a field's item count (multi-item fields)
zbiniol - August 12, 2009 - 07:59
| Project: | ImageField |
| Version: | 6.x-3.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | filter, Imagefield, views |
Jump to:
Description
There should be ability of filtering views by imagefield with some options.
Single picture field:
- no_picture (returns records with no pictures)
- has_picture (returns records with pictures)
If imagefield allows more than one picture (list):
- picture_count (ex. return records with picture_count>2)
If content type allows user to put more than one picture as a result we
See also http://drupal.org/node/243473 - there is relationship workaround, but it is not enought.

#1
Filters are provided by the module that provides the field.
#2
Everything you are talking about could be accomplished with a single 'count' filter.
For example:
Configure filter Content: Image (field_image) - count
Operator:
[ ] Is less than
[ ] Is less than
[ ] Is less than or equal to
[ ] Is equal to
[ ] Is not equal to
[ ] Is greater than or equal to
[ ] Is greater than
Value:
[ textfield allowing integer ]
A numeric value.
It would also be awesome if we could display a field's count just like any other meta value (e.g. nid), with the ability to: Exclude from display, Rewrite the output of this field, Output this field as a link, Trim... etc,
This would make it possible to create a Title like: My gallery (8 images), something that is currently not possible to do.
It also seems like this should not be limited to just imagefield module when it is just as applicable to any field that allows multiple values e.g., node reference, file field, link, em_video, etc.
[I'm beginning to think there must be some wicked problem somewhere or this would already exist...]