Is there a way that I could check with views if there is a an image in imagefield that is populated by feeds, so if there is not an image then I could not show that feed item? If this is not possible I am asking for a possiblity of adding this as feat.?

Comments

Marko B’s picture

Project: Views (for Drupal 7) » Feeds
Version: 6.x-2.x-dev » 6.x-1.x-dev
Component: exposed filters » Code

edit

Marko B’s picture

Project: Feeds » Views (for Drupal 7)
Version: 6.x-1.x-dev » 6.x-2.x-dev
Component: Code » exposed filters
dawehner’s picture

Project: Feeds » ImageField
Version: 6.x-1.x-dev » 6.x-3.x-dev

This has to be a feature of imagefield

Marko B’s picture

Hmm so imagefield adds code to views filters?

dawehner’s picture

Well can't you simply check for file id != 0?

Marko B’s picture

I got a little creative, as i have default image when there is no image i made it that filter checks if there is
FID=!327957 and then it just lists nodes with image. Guessing this could also work if there was no default image and then imagefield would be empty. But you do need relationships and many people dont think of them
often as possiblity, and also this is a "file" part of views, I would assume this was part for file attachments and not for imagefield. Anyway this works. Thanks on idea Dereine.

quicksketch’s picture

Status: Active » Closed (duplicate)

ImageField utilizes FileField, thus this is a duplicate of #480508: Create a "has file" filter/sort (then expose it to the user)

chinita7’s picture

@deepM can you tell me how to have the filter that allows enter FID manually?? Because I set the filter for "(field_pic) - fid" but it shows only the selection of "- Any -" "True" "False". And also how did you find the FID of the default image?

Marko B’s picture

List the nodes that have default image and add field that shows FID, you need to have relationship enabled to see Files.

chinita7’s picture

@deepM Thanks it works ! I actually hadn't set the relationship.