Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.0-rc9
Component:
Views Integration
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Oct 2008 at 02:50 UTC
Updated:
23 Oct 2008 at 22:54 UTC
Comments
Comment #1
karens commentedMost CCK fields are sortable. They work the same way others do. To use table sorting, mark the field as sortable. Or if not using a table, add a sort to the view. There may be some CCK fields where sorting won't work right (nodereference and userreference are examples), and if so they won't have that option, but all others do. Nodereference and userreference can be sorted, too, but you do it by adding a relationship to the view and then selecting the field in the referenced node that you want to sort on.
Comment #2
arhak commentedThe answer I was looking for: relationships.
I suspected that from the start, but all the cck fields wouldn't require a relationship, wouldn't?
Well, it turns out that in the cases I was trying they do.
I created many views with cck fields like: userreference, nodereference, content_taxonomy
so #274909: Views sorting for userref / noderef
PS: thanks anyway
Comment #3
zbricoleur commentedNodereference and userreference can be sorted, too, but you do it by adding a relationship to the view and then selecting the field in the referenced node that you want to sort on.
KarenS, could you explain that a little more, please? How does one add a relationship to a view?
Comment #4
yched commentedWhen editing a view, along with 'fields, 'filters', sorts, 'arguments', you have a 'relationships' section.
Add your noderef field as a relationship. Then each time you add a field to your view (say, 'Node created time'), you can specify that you want this field to apply to the nodes in the noderef field.
For more details, see Views help pages, available when you install the advanced_help module
Comment #5
zbricoleur commentedThanks yched. I just noticed this thread was about 6.x. I'm still on 5.x. I think I found the problem...