I am using articles container for some documents, only problem is that i dont know how to create new article via API inside Article container, regular code when creating new article does not work, post is not showing inside container, here is my code for creating simple ModDocuments
// secondly, create the new resource and save it:
$doc = $modx->newObject('modDocument');
$doc->set('parent',$parent);
$doc->set('pagetitle',$pagetitle);
$doc->set('longtitle',$longtitle);
$doc->set('alias',$alias);
$doc->set('description',$description);
$doc->set('template',$template);
$doc->set('published',$published);
$doc->set('searchable',$searchable);
$doc->setContent($content);
$doc->save();
<a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>
I've also had the same problem.
I solved it by creating an unpublished article that I use as a template based,
controls in the table the contents of the various fields, article uses a different type of resource.
FerX - Developer at Eracom s.r.l.
Sir, Articles Extra, I believe, extends Resource Object.
Different class_key
$doc->set('class_key','Article');
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
+1 for donshakespeare's solution.