Allow Taxonomy Terms to be sortable
fractile81 - April 28, 2008 - 18:19
| Project: | Views |
| Version: | 6.x-2.0-beta2 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
Views is coming along awesomely!
I have a table view that has a few "Taxonomy: All Terms" fields in it (needed because I want some of the table's columns to represent only one taxonomy each). Everything shows up on the view as expected, but I cannot sort by these "Taxonomy: All Terms" fields.
My request is that these "Taxonomy: All Terms" fields be sortable by the field's first term in a table view.
Thanks for all of the great work on this module!

#1
Unfortunately, this is not possible because the terms are not actually part of the query. They are pulled up from a second query, and there is no way to accomplish what you ask.
#2
content_taxonomy should provide a sideways approach to dealing with this issue when it is ported to 6 ... it allows you to store a snap shot of the term name in a text field (in addition to storing in a proper term_node relationship) which should be sortable in views ... I think that would address the needs of those looking to sort on a taxonomy term. The denormalized snapshot can come in handy in other areas too.
#3
Denormalized data is fun! That sounds like a great solution.
#4
Okay, so should revise my earlier recommendation regarding content taxonomy. Seems it is intended to completely replace taxonomy rather than augment it, so I think we've decided it may be more trouble than it is worth, but still remain a little undecided. As a result, I've been working towards a more primitive solution. I've added cck text fields for taxonomy items that I want to denormalize for use in views. Then I use hook_nodeapi to update the fields I want and hook_taxonomy to update all references to those fields should a taxonomy item change. Seems to be working pretty well so far, but augmenting normalized data w/ denormalized data can prove "interesting" ... I'll probably add a cron job to help w/ additional clean up just in case. If anyone has additional thoughts or commentary, I'd be interested.
Thanks!
Matt