// add a picture to each article $child->addChild($thinkedit->newModule('image')); } } // what is under node id 0 ? $mynode = $thinkedit->newModuleByNode(0); debug($mynode->id); debug($mynode->type); $mynode->load(); // post a message to mynode (arbitrary defined) $post = $thinkedit->newModule('post'); $post->setTitle('Do you agree?'); $post->set('message', 'here we go gentlemens'); $post->save(); $mynode->addChild($post); // or $post->addParent($mynode); // will this work ??? // relate this post to the news category $relation = new relation(); $relation->makeRelation($post, $news); // or $post->makeRelation($news); // Append an image file to the post : $image = $thinkedit->newModule('image'); // load image data here $image->setContent($imagedata); $image->save(); $post->makeRelation($image); //or $image->makeRelation($post);