Skip to content

Documentation

Jen Lampton edited this page Apr 12, 2017 · 3 revisions

Programmatically displaying nodes from a Queue

The following functions can be used to display nodes from a subqueue, based on their position. For more customized displays of content from a queue, please use a View.

For the most up to date Nodequeue API information, see https://github.com/backdrop-contrib/nodequeue/blob/7.x-2.x/nodequeue.api.php.

To Create a Block to Display Node Titles of a Queue

You'll need the Queue ID, which is easily extracted from the URL on the queue administration page.

Create a new block, and insert the following PHP snippet into the block:

  <?php print nodequeue_node_titles($subqueue_id); ?>

If you want this queue to be printed in the reverse order, you can tell it to print backward:

  <?php print nodequeue_node_titles($subqueue_id, '', TRUE); ?>

The '' in the line above is an optional title field. Feel free to put something here, but it's not terribly necessary in a block.

Clone this wiki locally