Sorting taxonomy nodes

Tech Notes

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`.

  1. Install and enable nodequeues and smart queues. We'll also need Views if that isn't already installed.
    1. drush dl nodequeue views; drush en views views_ui nodequeue smartqueue
  2. Allow smart queues to create a queue for our `categories` term.
    1. Navigate to admin/structure/nodequeue
    2. Add a new taxonomy queue
    3. Tick our category term in Taxonomy fields.
    4. Optionally limit it to our content type under Types.
  3. Add nodes to the queue. (New nodes will be added automatically). There is a secondary tab for this. Find it on the edit page.
  4. Replace the regular taxonomy/term page with a view.
    1. Navigate to views admin/structure/views.
    2. 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.
    3. 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.
    4. Under the Sort criteria remove all existing criteria (post date, stickyness). Add a new criteria specifying `Nodequeue: Postion`.

To do.

  1. Add `add to queue` link from tabs into contextual links.