Posted by stacysimpson on February 6, 2009 at 3:23pm
Jump to:
| Project: | Link |
| Version: | 6.x-2.9 |
| Component: | Code |
| Category: | support request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Issue Summary
I have a view setup to display information in table format; however, there is no checkbox available to tell the system to allow users to sort by the link field. (NOTE: I would like to allow people to sort by the link title, not the URL.) Has anyone else seen this behavior?
Comments
#1
Whoops, nevermind. I see that I have 'grouping' set.
#2
Well, looks like sorting by link title is still not available by default. We should make this a configurable option.
#3
To clarify, I'm referring to click sorting of table columns. The built-in view sorting method does sort by link title.
#4
Confirmed.
To further clarify: A field of type "link", when shown in a View, will sort by the URL rather than by the title. Expected behavior should be to sort by Title.
Additional request: add option to sort by URL or Title.
But for me, it does not matter if the view column is set to be click-sortable. (under Basic Settings, Style (Table), "gear icon" options) Either sortable or not, it still sorts by URL.
Confirmed with the following configuration:
Drupal 6.13
Link 6.x-2.6
CCK 6.x-2.4
(rest of the install is acquia-drupal-1.2.15.5086)
other settings:
URL is set as optional in the field's global settings.
Link Title is set to "required."
#5
#6
subscribe
#7
subscribing
#8
It's a bummer this is still an issue, I'm having trouble with it, too. I will have to try to think of what to do for a workaround for now.
#9
A complicated workaround:
We'll call the field in question "field A".
Add another URL field "field B." Set field B to "Exclude from display" and order it in your view before field A. On field A, "Output this field as a link", set the "link path" to a token for field B like this: [fieldB_url].
At least that's how I remember it... I hope I got that right... YMMV...
#10
This is rather more a support request for views / exposed filters tweeking and handling the link field, than for the link field module itself, which is here for storing and validating link data in custom fields in the first place.
please redefine the issue. I got to move it.
#11
Well the link module could for example do this logic in a custom field handler.
Therefore it would have to override click_sort(), then join to the other node table and sort by the title.
#12
Hm ...
not sure if I understood it all right here, but link module provides already sorting for unlimited values at the node/add scenario. But how can the link module sort anything on the display's side of the world?
And why such a display task so closely intertwined to a storage module in a modular designed framework? Doesn't sound that druplish to me ... but maybe it's all language strain since english isn't my native lang.
#14
At least the issue here is definitive not about a general integration of cck into views.
A general integration would sort by the actual value(the nid) and not the node title.