6

How can I automatically add a node to a specific nodeQueue when this is created (I'm using nodeQueue module: http://drupal.org/project/nodequeue).

The reason is that I want an sortable (by dragging the nodes) list of the nodes and I want them to be automatically added to it..

thanks

aneuryzm
  • 63,052
  • 100
  • 273
  • 488
  • http://stackoverflow.com/questions/3529874/drupal-automatically-add-new-nodes-to-a-nodequeue/10483181#10483181 I tried this and it worked. Hope this helps. – Dani Aug 13 '15 at 17:43

3 Answers3

0

Try these functions:

  • nodequeue_get_all_qids() give us the avaliable $qid's
  • nodequeue_load ($qid)
  • nodequeue_load_subqueues_by_queue($qid) give us $sqid's
  • nodequeue_load_subqueue ($sqid) load a subqueue the sqiu is exactly that same as qid
  • nodequeue_subqueue_add($queue, $subqueue, $nid) - that is able to add the nid to queue :)
kleopatra
  • 51,061
  • 28
  • 99
  • 211
0
  1. there are modules to create nodequeue for terms, you can create nodequeues with preloaded nodes with those modules
  2. you can add a trigger and write your own logic to select and insert nodes
  3. if you just want to test the nodequeue, just type on the interface, the auto-complete field is very friendly
Andy Lin
  • 545
  • 2
  • 4
  • thanks. Can I automatically include all nodes of a "Content Type" (Like in Views rather than using a trigger ?) thanks – aneuryzm Aug 09 '10 at 09:37
  • the simplest way i can come up is to write a simple script that pull the data and insert into queue with nodequeue_save(); you can find examples at: http://drupal.org/node/293117 – Andy Lin Aug 10 '10 at 01:47
0

Triggers and Actions, and maybe the workflow module should let you automate this. See http://www.drupal.org.uk/node/259

Oscar M.
  • 1,076
  • 7
  • 9