implement workflow_ng action to create node serie
Hanno - January 24, 2008 - 20:58
| Project: | Node factory |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | clemens.tolboom |
| Status: | won't fix |
Jump to:
Description
It would be nice to have some actions in workflow_ng implemented by this module for creating nodes.
For example to create a serie of nodes base on a nodetype that functions as a template.
implementation of a function hook for workflow_ng to create an action for creating nodes in a serie.
<?php
function node_factory_action_info() {
return array(
'add_serie_nodes' => array(
'#label' => t('Create childnodes based on a serie'),
'#arguments' => array(
'serie_node' => array('#entity' => 'node', '#label' => t('Source nodes as templates')),
'target_nodetype' => array('#entity' => 'node', '#label' => t('Target_nodetype for the new nodes.')),
'cckfield_serienodeID' => array('#entity' => 'node', '#label' => t('CCKfiled to place the serienodeId in.')),
),
'#module' => t('Node'),
),
);
}
?>
#1
This action would produce nodes into a void context. Ie what is the new node title. Or owner?
An elaborated example would help though.
#2
- new node title of the target node should be the same as the original one
- owner should be the one who created the node.
In general, we could copy all the values of the node, except of the owner and id
#3
Thanks for you suggestions.
The title should be "(generated) [node:title]" i guess. Because it should be considered a programmers bug if not properly set.
The owner is the current user who's executing
node_factory_create_node();.- who triggered this workflow?
- how: through a menu click or by creating a content type.
My guess is that this action needs careful designed features. Maybe even a php 'postproces' block if possible.
Regards,
Clemens
#4
As nobody else joined this discussion I don't think it seems useful.