Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
dawehnerLet's move the issue to cck.
Comment #2
l0calh0rst CreditAttribution: l0calh0rst commentedAnyone?
Comment #3
KarenS CreditAttribution: KarenS commentedThis is actually a Filefield issue.
Comment #4
quicksketchSorry 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.
Comment #5
l0calh0rst CreditAttribution: l0calh0rst commentedhehe, at least i get around :)
Thanx for the heads up.
Comment #6
l0calh0rst CreditAttribution: l0calh0rst commentedWell, 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