Views 6.x-2.12.

I have a set of nodes and a taxonomy (lets say the terms are "Beer", "Wine" and "Spirits"). All nodes may or may not have one or more of these terms. Some nodes have no terms.

I have created a view and I would like to sort the order of the nodes using the terms. I would like any node with the term "Beer" to float at the top of the sort order (like a sticky) and all other nodes to then display next in the order.

How would I do this please?

Comments

Generally, you would add to

Generally, you would add to your sort criteria node:term and give this priority so that all "beer" "wine" and "spirits" nodes would then sort together, and then your second criteria (title, or published date, or whatever) would drive the secondary sort.

You may need to add a relationship to access the associated terms on nodes. Also, since you may have multiple terms per node, expect duplicates (which isn't necessarily a problem)

To perform an arbitrary sort order (since, contra your example, you may not presume an ascending sort will give your "b" term priority) check out http://drupal.org/project/nodequeue which allows for arbitrary sorting. Note that if you add a single term to your nodequeue, that would effective be the first item in the sorted list.

Hmmm...sounds painful! I

Hmmm...sounds painful! I wonder if it might be easier to duplicate the data in a CCK field and use that instead.