We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I found that the FixedPre plugin (linked to OnParseDocument) worked with some tags and not others. I was modifying $modx->resource->_output but found that the code invoking OnParseDocument looks like this:

    <?php
    $this->modx->documentOutput = $content;      /* store source code so plugins can */
    $this->modx->invokeEvent('OnParseDocument');    /* work on it via $modx->documentOutput */
    $content = $this->modx->documentOutput;


    I made this change and things are fine:

    -$output =& $modx->resource->_output;
    +$output =& $modx->documentOutput;
    


    My question is about where things are headed with this. Is $modx->resource->_output deprecated (or wrongheaded)?
    Is $modx->documentOutput permanent and should it be used for other plugins that modify output before it’s rendered?

    Or what? tongue

      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting