We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20413
    • 2,877 Posts
      @hawproductions | http://mrhaw.com/

      Infograph: MODX Advanced Install in 7 steps:
      http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

      Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
      http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
      • 36686
      • 165 Posts
      Oh cool, that was it. Thanks Lammikko smiley
        • 5811
        • 1,717 Posts
        @lottaar

        I did a search with "9412974" on your site and I get the following result:

        ... Modell Best nr1 Krom Vit Borstad krom Guld Krom/Guld LS-11-DT SEG nr 9412973 9412974 9412975 9412940 9412941 RSK nr 8758589 8758590 8758591 8758592 875859...

        In your case, it could be nice to display the html table as result, not only the values (without the html tags). For that use your own stripOutput function, rather than the default AS stripOutput function :

        for that adds the following code in a dedicated configuration file (in the config folder), for instance somatherm.config.inc.php:
          function somathermStripOutput($text){
        
            if ($text !== ''){
              // replace line breaking tags with whitespace
              $text = stripLineBreaking($text);
              // strip modx sensitive tags
              $text = stripTags($text);
              // strip Jscripts
              $text = stripJscripts($text);
              // strip html tags except div,table,tbody,th,tr,td tags. Tags should be correctly ended
              $text = strip_tags($text,'<div><table><tbody><th><tr><td>');  
            }
            return $text;
          }
            return $text;
          }


        The main difference with the default stripOutput function of AS:
          function defaultStripOutput($text){
        
            if ($text !== ''){
              // replace line breaking tags with whitespace
              $text = stripLineBreaking($text);
              // strip modx sensitive tags
              $text = stripTags($text);
              // strip Jscripts
              $text = stripJscripts($text);
              // strip html tags. Tags should be correctly ended
              $text = stripHTML($text);  
            }
            return $text;
          }
        is that you don’t remove the HTML Tags used to set up a table.

        And in he landing page change your AS snippet call by adding:
        &config=`somatherm` &stripOutput=`somathermStripOutput`

        If needed increase the &extractLength parameter to get the complete <table></table> definition.

        For more information look at this demo page. In this demo, with ajax mode, but it is the same thing with the non ajax mode, we keep safe the images in the results output, by changing the stripOutput function (use of stripHtmlExceptImage() function rather than the stripHTML() function).