5

I am a Drupal newbie using Drupal 7.

I made a taxonomy for documents, and then a view in the views module to list the documents. When the view searches by the taxonomy term, it seems to sort by the term's ID number, rather than the name of the term. I want an alpha sort on the term, not the ID number. Is there a setting to change this that I've missed, or do I need to do programming to change it? Seems like a pretty common situation.

ID   Name
1    Homeland Security
2    Criminal Justice
3    Violence Against Women

will sort as above, not with Criminal Justice first.

2
  • I can't reproduce this. You have selected Taxonomy: Term and not Taxonomy: Term ID in the Sort Criteria box?
    – Laxman13
    Commented Jun 15, 2011 at 18:04
  • Now I see those choices under "Sort Criteria." And when I choose "Taxonomy: Term" it seems to work. But there are also sorting settings under Format -> Settings. I'm confused about what does what where. Commented Jun 15, 2011 at 18:18

2 Answers 2

1

Make sure you have Taxonomy: Term selected under the Sort Criteria box and not Taxonomy: Term ID.

I believe the sort that you are seeing under Format -> Settings is where you can select which fields are sortable and the default sort for a view of format: Table. Making a field sortable creates a clickable link as a header for the table column allowing you to change the sort order by that field.

0
  • Create a view and select type as Term
  • Add field Taxonomy Term
  • Add sort criteria Taxonomy Term and then define sort order

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.