Hello,

I have a view of nodes that I would like to sort by a CCK filefield. Those nodes that do have a file uploaded to that node should be first in the list. The rest should be ordered by node title.

In the sort criteria I can add the field "(field_prof_video) - delta". And then I can tell to sort ascending or descending. But that does not have any effect.

Can anybody give me a hint how to accomplish such a seemingly simple task please?

Thank you.

Comments

dawehner’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Version: 6.x-2.9 » 6.x-2.8
Component: node data » Views Integration

Let's move the issue to cck.

l0calh0rst’s picture

Anyone?

KarenS’s picture

Project: Content Construction Kit (CCK) » FileField
Version: 6.x-2.8 » 6.x-3.x-dev
Component: Views Integration » Code

This is actually a Filefield issue.

quicksketch’s picture

Status: Active » Closed (duplicate)

Sorry to keep punting you around (it is indeed a FileField question), but this is a duplicate of #480508: Create a "has file" filter/sort (then expose it to the user). See that issue for a description of the problem/solution.

l0calh0rst’s picture

hehe, at least i get around :)

Thanx for the heads up.

l0calh0rst’s picture

Well, just fyi... some nerdy crack actually helped me out in this project. Let's see if i can reproduce:

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