Bob, I couldn’t for the life of me get your concept to work... I don’t really understand what you want me to do???
I made a plugin named "test" and pasted your code into the plugin. Then I went into the plugin and set OnWebPagePrerender to Checked.
Then I made a chunk called "debug"
then what? do i call debug in my content of my test page? like [[$debug]] or do i just leave it. either way, i get this"
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /home/mysite/public_html/testsite/core/cache/includes/elements/modplugin/1.include.cache.php on line 9
I looked at your code and I think you mean ’ instead of a " so i fixed that and now it doesn’t seem to do anything?
what should I be looking for?
<?php
$chunk = $modx->getObject('modChunk', array('name'=>'debug'));
/* Put any debugging information in the string, $s */
$s = 'Plugin Fired';
$chunk->setContent($s);
$chunk->save();
ok, got it.. I put anytthing in my chunk - debug, then when I call debug its replaced with "Plugin Fired" which makes sense, looking at your code. So its working... now to test this theory in 2.0.8 to 2.1 upgrade