I am porting a module from Drupal5 to Drupal6. I try to create a node programmaticly, which should also save the taxonomy-terms(freetagging) of the node.

In Drupal5 I used this code.

$node = new StdClass();
.......
.......
.......

$node->taxonomy =
         array (
           'tags' =>
           array (
             1 => 'Beer,Becks',
           )
    );

node_save($node);

What would "$node->taxonomy" look like in Drupal6???

Thanks for your help!

Cheers around the world,

Ralph

Comments

binki’s picture

Category: feature » support
ainigma32’s picture

Status: Active » Fixed

Install the Devel module and use Macro to see what the array should like. Then use drupal_execute.
See here http://drupal.org/node/293663 for more info.

- Arie

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

okday’s picture

Hi,

have you found a solution?

thanks