[support] How to relate nodes to a category

Ingeniería de Sistemas info.ingsist at gmail.com
Sat Aug 11 01:42:09 UTC 2007


It is something the like, but I want to make it thru api 
drupal_execute('story_node_form', $values, $node)
with  the correct values for parameters $values and $node.
 
As I could see this should be somethimg around the following:
$node= array ("type"=>"story");
$values['title']= 'title';
....
$values['category'] = array ("[nn]" => $cid);
drupal_execute('story_node_form', $values, $node);
where nn is the container for the categroy  and cid is the last category 
of the path.

(This is taken from node values after submitting a form, based on a 
handfilled story form related to a category)




Jason Flatt wrote:

>On Friday 10 August 2007 17:36:36 Ingeniería de Sistemas wrote:
>  
>
>>What I am trying to do is to set up a dinamic category tree using
>>category.module, sorry (:  I dont want to create the full tree in
>>advance because of the extension,  but let the user create the path
>>he/she wants to see choosing from a combo. After path creation I also
>>want to add a story node  to that path and that is the point where i am
>>stucked.
>>
>>    
>>
>
>Maybe this is what you are looking for:
>http://api.drupal.org/api/function/taxonomy_node_save/5
>
>If not, try searching for taxonomy to see what else shows up.
>
>
>  
>



More information about the support mailing list