Sorting taxonomy nodes
Nodequeues is one of the more common ways to sort nodes in Drupal. You can create `arbitrary lists of nodes` and order them via drag and drop. Smart queues are ways that modules can define methods for automatically creating queues. Nodequeues ships with a taxonomy smart queue that we can use to create queues for taxonomy terms or `categories`.
- Install and enable nodequeues and smart queues. We'll also need Views if that isn't already installed.
- drush dl nodequeue views; drush en views views_ui nodequeue smartqueue
- Allow smart queues to create a queue for our `categories` term.
- Navigate to admin/structure/nodequeue
- Add a new taxonomy queue
- Tick our category term in Taxonomy fields.
- Optionally limit it to our content type under Types.
- Add nodes to the queue. (New nodes will be added automatically). There is a secondary tab for this. Find it on the edit page.
- Replace the regular taxonomy/term page with a view.
- Navigate to views admin/structure/views.
- Clone the Taxonomy term view (provided by the Views module). Note: the template tpl file will be based on your choice of view name. Ours is views-view--taxonomy-term-nodequeue--page.tpl.php.
- Edit the view. Under the Advanced section add a Relationship to Nodequeue. Don't require this relationship but do `Limit to one or more queues` specifying our `category` queue.
- Under the Sort criteria remove all existing criteria (post date, stickyness). Add a new criteria specifying `Nodequeue: Postion`.
- Add `add to queue` link from tabs into contextual links.