[support] Inserting a new taxonomy and adding a node in this taxonomy
Carlos Rincón
crincon at neuroticweb.com
Mon Feb 19 16:45:10 UTC 2007
Hi all,
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;
}
}
(This is from drupal.org)
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,
--
Carlos Rincón
www.neuroticweb.com
www.neuroticweb.com/blog
More information about the support
mailing list