Create a "has file" filter (then expose it to the user)
Heilong - June 3, 2009 - 06:59
| Project: | FileField |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi everyone,
I have Imagefield which allow my user to upload at most 5 images to complete the node, I also enabled default image to display something in case of the user doesn't have any image to upload.
I also have a formatted view of the content and now I tried to let users filter by images, to let the view display all nodes with images or without images (default image).
Is it possible to realize this ?

#1
#2
Hm, this isn't a use-case I'd though of. There currently isn't a "has file" filter, because you can accomplish the same thing with a relationship. However there isn't a way to expose such a setting to show only nodes that don't have files. This was marked won't fix in several issues I believe. See #317784: filter by imagefield with views 6.x? for some brief instructions on setting up a relationship to do this.
So I'll mark this as a feature request since it's a valid request to have this as a filter so that you can expose it.
#3
Yes, I saw that post on how to set up a relationship.
But it wasn't what I needed, actually for this feature it could be something like a filter which show the user "with pictures" or "without pictures" to test if the default Imagefield Image is present.