0

I am looking to list a views result set based on whether it does or does not have a photo in the photo field. I think I remember this being part of d6? d5 maybe? Regardless, I cannot find it for d7 if it exists.

If there is no such option, thoughts on how to limit a result set based on whether the field contains a photo / file or not?

Thanks

2 Answers 2

1

You definitely can do that in D7/V3.3. Just add a filter field that reads like: Content: IMAGE_FIELD_NAME:fid (not empty)

1
  • Having some problems with this approach. I can choose the above settings, but now, if a post has more than one image, then, in the view results, the image is repeated a number of times equal to the number of photos, so lots of duplicate content. Any thoughts on how to fix that?
    – blue928
    Commented Jul 16, 2012 at 21:54
0

You can add this field as a filter criteria on your view. Choose the "User: Picture" field and check if its empty or not. Probably you need to create a relation to the user if you have a "Content" related view.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.