Hi Everyone,
I’ve add two new OnParseDocument and OnLoadWebDocument events. The OnParseDocument event will be very useful for users wanting to add more power to their pages. Check this out:
This plugin will replace ever instance of "@w" with "WOW!" and every instance of "@c" with "COOL!".
$source = &$modx->documentOutput;
$source = str_replace('@w','WOW!',$source);
$source = str_replace('@c','COOL!',$source);
Now if we add the text "@w This is @c" to a document the parser will then convert it to "WOW! This is COOL!"
Note here that you can referenc the document source by using the &$modx->documentOutput variable.