By syawillim on
I have used imagefield to attached images to blog posts, it is not a required field. Now I would like to create two views;
1) to list those that have one or more images uploaded
2) to list those that have no images uploaded
Any thoughts?
Comments
Can you just add the fields
Can you just add the fields in your view and if there is nothing there nothing will appear. If you want something else then I think you'll have to create a tpl.php file in your theme to check for the number of attached fields and then use views_embed_view() to pull in the proper view
Let me clarify; for the
Let me clarify; for the relevant view I want the node to list or not depending on whether the field is populated or not.
I think you'll have to create
I think you'll have to create an argument using PHP that will check the node to see if the field is populated or not. Create one view that will show if the field is populated and create another view that will show if the field is NOT populated
I got this sorted with a
I got this sorted with a little help from my man gordon, thanks a bunch!
It's as simple as it should be, all that is required is to create a relationship to Content: Image - fid then set a filter based on (Image) File: File ID.
Cool. Glad you got it sorted
Cool. Glad you got it sorted