How can I automatically add a n开发者_StackOverflow中文版ode 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
- there are modules to create nodequeue for terms, you can create nodequeues with preloaded nodes with those modules
- you can add a trigger and write your own logic to select and insert nodes
- if you just want to test the nodequeue, just type on the interface, the auto-complete field is very friendly
Triggers and Actions, and maybe the workflow module should let you automate this. See http://www.drupal.org.uk/node/259
Try these functions:
nodequeue_get_all_qids()
give us the avaliable $qid'snodequeue_load ($qid)
nodequeue_load_subqueues_by_queue($qid)
give us $sqid'snodequeue_load_subqueue ($sqid)
load a subqueue the sqiu is exactly that same as qidnodequeue_subqueue_add($queue, $subqueue, $nid)
- that is able to add the nid to queue :)
精彩评论