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.

Comments

merlinofchaos’s picture

Project: Views (for Drupal 7) » ImageField
Version: 6.x-2.6 » 6.x-3.x-dev

Filters are provided by the module that provides the field.

zach harkey’s picture

Title: Filtering by imagefield » Allow filtering by a field's item count (multi-item fields)

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...]

quicksketch’s picture

Status: Active » Closed (duplicate)

See #480508: Create a "has file" filter/sort (then expose it to the user), since this is a general FileField issue, not something specific to ImageField.