Nodequeue

Overview

The Nodequeue module allows you to select an arbitrary set of nodes that may not share any common metadata, and arrange them in an arbitrary order. Both aspects of this are important: if your nodes share some traits (e.g. they’re all news articles published in the last month; or they’re all either female historical figures, or historical figures who were born in Cleveland) you can just use Views to gather together those nodes. The ability to create “and/or” filters can make this possible even for fairly complex sets of traits that are derived from metadata that’s stored in the database.

If you just want to create a set of arbitrarily defined nodes, where the connection between them isn’t based on any data stored in the database (e.g. “staff picks”, where the selection criterion is derived from staff members’ personal preferences), you can use the Flag module, described here. What Flag doesn’t allow you to do is to arrange those flagged nodes in any arbitrary order: if you want to display the flagged nodes, you’ll need to use Views, and you’ll have to order them using some metadata that’s available to Views (e.g. publication date, the value of some field, etc.) Flag + Views doesn’t support an entirely human-defined ordering of nodes (e.g. “display the nodes from those that make me happiest to those that make me saddest”.)

Nodequeue supports both pieces: a human-defined selection of nodes, arranged in a human-defined order. From the perspective of digital humanities use cases, one can imagine using it as a way to define Scalar-like paths through the database, or Omeka-like exhibits.

Configuration

Install the Nodequeue module, and enable Nodequeue. (You don’t need the sub-modules.) Go to Structure > Nodequeues and click on the button “Add simple queue”.

Give the queue a name, and specify a maximum size if you want to put a limit on it. (The default setting is 0, which here, paradoxically, means “all”.) You can specify the roles that should be able to add a node to the queue, as well as the content types that can be added to the queue.

After you hit “Submit”, when you go to any node belonging to a content type you specified, you’ll see a new “Nodequeue” tab. When you click on it, an overlay will pop up listing the queues that you could add the node to, along with how many other nodes are in each queue. (In the example below, there is only one queue that pertains to that particular content type, but multiple are possible.)

Nodequeue tab

Nodequeue \"add to queue"

To rearrange the ordering of the nodes, you can click on the queue name from the overlay, which will take you to the queue’s page. There you can drag and drop the nodes in the queue into a different order, or hit one of the buttons to reverse the current order or randomly shuffle the nodes. You can also use the autocomplete box to add more nodes to the queue.

Nodequeue queue list

Views integration

Nodequeue just provides the structure to gather together and order nodes. Actually doing anything with them will involve Views. Not all displays will work equally well here: for instance, timeline modules (with the exception of A Simple Timeline, where you can easily define a different sort order) try to order their contents chronologically. Lists, grids, and slideshows are good candidates.

The default settings for the Nodequeue module automatically create one view per queue. After you’ve created a queue, if you go to your list of views (Structure > Views) you’ll see a view called “nodequeue_1”. This view just shows an unordered list of content (rather than fields), but you can modify this view however you want. You can also mimic the settings used by these automatically-generated views (i.e. by adding the relationship “Nodequeue: Queue”, and the sort criterion “Nodequeue: Position” using that relationship) to create a view from scratch.

Modules: