Drupal 6: sorting views' result by whether having image or not

2012
Drupal 6: sorting views' result by whether having image or not

The target is to show nodes with images on top and nodes without image after. It sounds like a straight forward requirement that Views could do it. Unfortunately, module filefield doesn't provide such filter to View.

After a few searches, here is the solution from: http://drupal.org/node/981710#comment-3812512

It does the trick by sort criteria ("File: MIME-Type")

1. add a new relationship ("Video (field_prof_video) - fid" in my case), give it a name and leave anything at default state

2. add a new sort criteria ("File: MIME-Type"), set it's relationship to the one we created in 1 and finally set the order to ascending or decsending.

3. DONE

Leave a comment