Vocabularies, Nodequeues, and Views

We've all been there. A client wants the nodes of one content type to be filtered and displayed on six different pages based on the content of one of the fields. No problem! Views was MADE for a task like this!

Oh yeah, I forgot, there's this twist. The client wants to be able to control the order that the nodes appear in. Again, no problem! We have Nodequeue!

When you create a nodequeue, it automatically generates a corresponding view that's pre-configured to receive the nodes in the queue, in the prescribed order. Excellent. Let's just whip up a node queue for each page that the customer wants. STOP RIGHT THERE!

This seems like the most straight-forward solution, but there are hidden problems. If we create one nodequeue per page, then we have to maintain each view independently. Need to suddenly add a field to the view? Need to do custom templates? Maintaining six identical nodequeues becomes a black hole of time.

Enter the Smartqueue

Nodequeue ships with the Smartqueue API and includes one for taxonomies right out of the box. A Taxonomy Smartqueue allows you to create a single nodequeue, associate it with content types and vocabularies. When you add a node to the queue, it is automatically placed in one or more subqueues based on its terms. The user can then re-order the nodes within each individual subqueue to the order they would like them displayed.

Our six-page, six-nodequeue, six-view solution can now be reduced to a six-page, one-nodequeue, one-view solution. By utilizing the Nodequeue: Subqueue arguments, you can easily select which subqueue to display in the view, and by adding additional displays, you can easily customize your views to accommodate any minor differences between the different subqueues.

The big benefit, though, is that if things change down the line, you only have one nodequeue, one view, one set of templates, etc. to maintain. And if you make use of the Add/Remove Queue links, you will only have one link to add or remove it from all the applicable subqueues. This streamlines the experience of the end-user content admins.

Smartqueues. Tell your friends.