I maybe should describe my problem some more. All leads to "a NewsPublisher that saves a TV value" is redirected to this post. First I was thinking of using MakeForm by OpenGeek, but realized that it want optimal for my purposes. Then I tried ur001’s Docmanager without success. I tested in both 0.9.2 and 0.9.5 to see if it was an version issue. Unfortunatley I didn’t manage to get it to work on either. No new document is created, do’h.
My code looks like this:
<?php
require_once($modx->config[’base_path’] . ’assets/libs/docmanager/document.class.inc.php’);
$submited=isset($_POST[’submit’]);
if(!$submited) {
return $modx->getChunk(’LaggTill’);
}
else{
$doc = new Document();
$doc->Set(’parent’,$folder);
$doc->Set(’alias’,’post’.time());
$doc->Set(’content’,’content’);
$doc->Set(’template’,’VMD’);
$doc->Set(’tvyrsModel’,’tvyrsModel’);
$doc->Save();
}
?>
I tried to The Man Can!’s version too. But how am I suppose to save the TV value through the input form? Just name the fields with a "tv" as prefix? or do I use an extra parameter in the NewsPublisher call? I’m complete lost here. nmac (read
http://modxcms.com/forums/index.php/topic,5983.15.html) was on the right track, but hacking the NewsPublisher snippet with ur001’s api is way too complicated for a guy like me
0.9.5 kicks ass by the way, nicley done!
Thanks.