We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41144
    • 15 Posts
    Hi,

    I would like to modify full web page content just before it is written to cache (or output to browser).
    The reason for it is e.g. put & nbsp; in some words (in Poland we do not leave some conjunctions on the end of the line).

    I'm trying onWebPageComplete and $modx->resource->_output, but to no avail.

    Thanks [ed. note: remek555 last edited this post 13 years ago.]
      • 3749
      • 24,544 Posts
      OnWebPageComplete is too late. It's already cached at that point.

      If you want it before the tags are parsed, use OnParseDocument. If you want it after the tags are parsed, use OnWebPagePrerender.

        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
        • 41144
        • 15 Posts
        beautiful, thank you.

        Combo OnWebPagePrerender with $modx->resource->_output worked like a charm smiley