我正在尝试通过编写脚本来填充节点...我正在使用以下代码
$node->field_tags['und'][0]['textfield'] = 'first_tag';
$node->field_tags['und'][0]['textarea'] = 'This is tag';
$node->field_tags['und'][0]['tid'] = 2;
node_save($node);
什么都没有,并且该术语没有被添加到名为标签的词汇表中...如果我编写以下代码,它将选择已经存在的术语调用 xml ..我猜是因为 tid=1;
$node->field_tags['und'][0]['textfield'] = 'first_tag';
$node->field_tags['und'][0]['textarea'] = 'This is tag';
$node->field_tags['und'][0]['tid'] = 2;
node_save($node);
我什至尝试了以下代码
$node->field_tags['und'][0]['name'] = 'first_tag';
$node->field_tags['und'][0]['description'] = 'This is tag';
$node->field_tags['und'][0]['tid'] = 2;
node_save($node);
有人可以帮我如何将术语添加到已经存在的词汇表中