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

merlinofchaos - June 3, 2009 - 16:05
Project:Views» ImageField
Version:6.x-2.5» 6.x-3.x-dev
Component:exposed filters» Code
Status:needs work» active

#2

quicksketch - June 3, 2009 - 21:39
Title:Imagefield default image filter » Create a "has file" filter (then expose it to the user)
Project:ImageField» FileField
Version:6.x-3.x-dev» 6.x-3.x-dev
Category:support request» feature request

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

Heilong - June 4, 2009 - 04:17

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.

 
 

Drupal is a registered trademark of Dries Buytaert.