Closed (duplicate)
Project:
ImageField
Version:
6.x-3.0-alpha2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Nov 2008 at 22:36 UTC
Updated:
4 Dec 2008 at 14:26 UTC
It would be great to have a views filter allow you to filter out nodes where there is no image uploaded for that field.
Comments
Comment #1
dorien commentedSame feature request.
I need this so I can put a custom empty text for users who don't have any images uploaded. I am sure this worked before in 5.x
Thanks for the great module by the way. My favorite way of handling images!
Comment #2
mandclu commented+1 for adding a views filter
Comment #3
dorien commentedOr can we do this with a view of the type "file". I'll try that!
************
Update: nope, sorry, that doesn't seem to work :-)
Comment #4
dorien commentedHere is a temporary way around the issue:
Instead of adding an empty text, I added a footer with the following code:
This does require you to have the nid argument in the url, otherwise it won't work. You also need to replace field_avatar by whichever you imagefield is called.
Greetings!
Dorien
***********
Update: just as an example, I use this to display a default avatar I made when there is no avatar:
Comment #5
tech4him commented+1 more for adding this filter. Would be a great addition.
Comment #6
drewish commentedsee #317784: filter by imagefield with views 6.x? for instructions on how to setup a relationship.
Comment #7
dorien commentedWorked for me! Thanks.