Hello World!
HTML; $crawler = new Crawler($html); $crawler->filter('h1')->text('Changed!'); $content = $crawler->html(); $page->setContent($content); ?>
newObject('modResource'); $page->setContent('In this example, we're using the setContent function to set the contents of a MODX resource. The setContent function is called on a new MODX resource object, and the content of the page is set to a simple "Hello World!" paragraph. Package library: MODX CMSHello World!
'); ?>