We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32982
    • 674 Posts
    put om webpage prerender and if your server has this php extension instaled make a tidy to the output
    it could validate xhtml indent.... all"" tydi do. see the php tydi documentation to add tydy parameters to sweet your needs.
    i only use in this example for indent the code and give temm a good look....
    $e = &$modx->Event;
    switch ($e->name) {
    case "OnWebPagePrerender":
    $o = &$modx->documentOutput; // get a reference of the output

    $config = array("indent-spaces" => 5,"indent" => true,’wrap’=> 1000,"break-before-br" =>no);
    foreach ($config as $key => $value) {
    tidy_setopt($key,$value);
    }
    tidy_parse_string($o);

    $modx->documentOutput=tidy_get_output();

    break;
    default :
    return; // stop here - this is very important.
    break;
    }
      Jabiertxof (formerly XYZVISUAL)
      My bussines: http://marker.es
      https://www.youtube.com/user/jabiertxof/videos
      • 22303 MODX Staff
      • 10,725 Posts
      Please note that tidy is an optional PHP extension, and that this will not work on most configurations.

      Also, IMO, this might be a lot better to do when saving content rather than serving it; I can’t imagine the performance of using tidy during document rendering would be acceptable in most cases. Adding the plugin for tidy to clean the content of a template, chunk, TV or other MODx content block might be more practical, though it would be interesting to know how it reacts to the MODx template tags when doing so.
        • 32982
        • 674 Posts
        you think this plugin is a server overload problem, i want to know for deleting for my instalation...
        thanks
          Jabiertxof (formerly XYZVISUAL)
          My bussines: http://marker.es
          https://www.youtube.com/user/jabiertxof/videos