Closed (outdated)
Project:
Views (for Drupal 7)
Version:
6.x-2.10
Component:
Miscellaneous
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2010 at 08:43 UTC
Updated:
14 Mar 2019 at 19:58 UTC
Jump to comment: Most recent
Comments
Comment #1
dawehnerCurrently its not possible, without custom coding. You would have to override the argument handler of terms.
Comment #2
aiphesok thanks for replying, hope it'll be possible in future releases
Comment #3
dawehnerswitch to minor feature request. But i really think, that noone will code this.
Comment #4
Letharion commentedUnassigned task, up for grabs by anyone willing to provide the code.
Comment #5
kbaringer commentedIt looks as though this issue pertains to this Forum thread, which indicates that there are a number of people looking for this functionality.
http://drupal.org/node/921498
I'm still new to Drupal but if I come up with a patch I'll certainly submit it for consideration.
~K
Comment #6
iamjon commentedplease check http://drupal.org/node/1056170 I think that patch applies to this.
Comment #7
kbaringer commentedThanks for the suggestion, but unfortunately the patch in #6 doesn't solve the problem with sorting by taxonomy term weight. What it does is add an option to sort by vocabulary weight (which is also a worthwhile improvement!).
This does give me an idea of where to start looking though. The goal is to get taxonomy term weight to be recognized when the query results are grouped by taxonomy term in the HTML List style. This way the groups that are created for each taxonomy term will be sorted on the page by the weight of the term ($title in the item_list class as written by views-view-list.tpl.php).
Any additional suggestions are still welcome!
~ K
Comment #8
alberto56 commentedIt's actually sorting by reverse alphabetical for me.
Comment #9
alberto56 commented...I have only two traxonomy terms and few nodes so I just inverted them one at a time... bad idea, it worked on the English side of the site, but the French side orders them the reverse way. I can't seem to get a grip on how the ordering is done on a multilingual site, seems random. Anyone have any idea about this?
Cheers,
Albert.
Comment #10
iamjon commentedalberto did you try the patch?
if you didn't and it's not related please open a new issue.
in the mean time this is still an unassigned task.
Comment #11
alberto56 commented@iamjon I'm just documenting that terms are not always sorted alphabetically, something else is at play here. Perhaps it might help whoever has time to work on this; so IMHO that info might be related to this issue. I haven't tried the patch, no; looking for other ways around this for now. Thanks
Comment #12
suthy commentedMaybe I'm missing something, but I think I have this working with Views 6.x-2.12. I have a view of nodes of type Job, each of which are tagged with a single term from a Job Category vocabulary. In my view, I'm displaying linked node titles, grouped by term. To do this, I added a Taxonomy: Term field (exclude from display), then under the settings for Style, I chose "Grouping field: Taxonomy:Term". Under Sort criteria, I added Taxonomy: Weight in ascending order. Now if I go to admin/content/taxonomy/[tid] and use the drag-and-drop feature to reorder the weights of my terms, the grouping results of my view are reordered respectively. Is this what you're looking for?
Comment #13
aiphesit seem to be that i'm searching to..i'll try and feedback
Comment #14
alberto56 commented@suthy thanks for your comment.
That made me think about something: on my site I have four different taxonomy vocabularies associated with my content type. I assume you only have one (Job category), in which case it is interesting that sorting by Term weight works.
However, afaik there is no way in the GUI to sort by term weight of a given vocabulary, so if a node has taxonomy terms with different weights, which weight is used for the sort?
Comment #15
alberto56 commented... one more note: if we can answer that question (#14) perhaps we can modify the weights of the terms directly in the database to achieve what we need.
Comment #16
jelo commenteddereine, can you elaborate on how to get this done with custom code? I already have a separate tpl file for my view to sort by a secondary taxonomy (within the grouped fields) which works great. However, the taxonomy I group by is not displayed in the right order and I seem not to be able to get it right...
Thanks, J.
Comment #17
suthy commented@alberto56 you're right: I have one taxonomy. I've never tried with multiple taxonomies. Definitely worth a test when I have or someone has the time.
Comment #18
Andreas Radloff commentedI got this working (in D7 though) with multiple taxonomies by adding a filter for the vocabulary I wanted to sort by term weight on.
Comment #19
fbackelj commentedHello, using the patch #2 from http://drupal.org/node/1056170 I was able to get a two level sorted list, first by Grouping field and then by Node title. The details are at http://drupal.org/node/921498.
Maybe it helps for this issue...
Comment #20
Cablestein commentedD6.25, Views 6.x-2.16
Try this module, works for me:
http://drupal.org/project/views_groupby
The module is built for deeper reasons but along the way it seems to give you sort control (via the SQL query) before the regular Views styled list grouping.
FYI, it took some tinkering in the Fields area but eventually was able to get it right. I had to read the module basic example in the documentation a few times.
Also... funny thing... the preview of my View and the View in my page node are reversed. So basically you cannot trust the Views preview output when using this module. I think maybe the query being generated by Views preview and Views in the page node may be slightly different.
Comment #21
dervishmoose commentedI worked around this issue by creating a "secondary" vocabulary and adjusted all of the items (terms) in the secondary to have term weight of 1000 or more. Then I could use the sort by term weight and group by term. All of the nodes taged with terms from my Primary vocabulary float to the top and items in my secondary vocabulary sink to the bottom.
Comment #22
colanIn Views 3+ (D6 & D7), you can do this by adding the vocabulary as a Relationship, and then Weight will show up in the Sort section.
See the following for details:
Comment #23
colanComment #24
chris matthews commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue