i need to add in the fly a taxonomy to a book. I've put an extra field
in my book (a cck node) in case the user want to add a new taxonomy
without going to the form taxonomy.
I've a custom module to handle this:
function source_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'submit':
if ($node->type == 'content_libro') {
echo "Nuevo Autor: " . $node->field_nuevo_autor[0]["value"];
}
break;
case 'insert':
break;
case 'update':
if ($node->type == 'content_libro') {
echo "Nuevo Autor: " . $node->field_nuevo_autor[0]["value"];
}
break;
case 'view':
break;
}
}
Now i need to create the taxonomy and then to put the book node in this
taxonomy. I suppose it can be done with taxonomy_nodeapi o something
similar but i'm newby in Drupal.
thanks in advance,
Comments
Replying to myself
Within case submit:
Omtisis Consulting