« Node Import with Content Taxonomy Fields | Main | How to Create a DataFile from within DataSet »

October 06, 2010

Note about sorting Content Taxonomy Fields in Views

This comment says it all:

The ability to do so is there, it's just not immediately obvious.

Although creating a content taxonomy field and throwing it into a table produces a column of term names, Views only sees the data as a bunch of tids. Because of this, allowing the sorting on that column would produce some unintended results.

Instead, you need to create a relationship. Once you've created your Content Taxonomy field, go to your View and add a relationship. Under the "Content" selections, pick the Content Taxonomy field you want sortable. Save that, and now you need to create a new field. Select "Taxonomy: Term" as your field and continue. In the new options and in the "Relationship" dropdown, select the relationship that you just created, make any other changes you'd like, then click the "Update" button.

At this point, you should be able to click your "Style: Table" gear and be able to sort by term name. Just remember to save the changes to the View itself! =)

Posted by kkwaiser at October 6, 2010 09:14 AM


Login to leave a comment. Create a new account.