We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21122
    • 153 Posts
    I’m using SimpleSearch 1.4.0 and MODx 2.1.1, and I’m having a problem getting the highlighting to work.

    I’ve got it working on previous versions of MODx/SimpleSearch, but its not working for me at the moment on a new site I’m working on.

    My SimpleSearchForm looks like:

    [[!SimpleSearchForm? &tpl=`searchFormTpl` &method=`POST` &landing=`31`]]


    And the SimpleSearch call on my landing page is:

    [[!SimpleSearch? &ids=`16` &hideMenu=`0` &highlightResults=`1` &highlightClass=`orange` &pagingSeparator=`` &showExtract =`0` ]]


    Its actually applying the class to the first instance of the search term on the page, where it tells me how many results have been found i.e. 1 Results found for "icons". Well the term ’icons’ does have the correct class applied to it, but not the results further down the page.

    Any help?!
      • 38101
      • 2 Posts
      I have the same issue.. If i say &showExtract =`0` the highlight class is added to the search word, but if i do &showExtract =`1`, it shows the extracts but doesn't add a highlight class anywhere.
      What could be wrong?

      I'm using SimpleSearch 1.5.1 and MODx 2.1.5
        • 38101
        • 2 Posts
        I'm sorry I had been searching for a long time before i posted, but just after the post i found the solution here http://bugs.modx.com/issues/6412 .
          • 34108
          • 66 Posts
          Thanks Joyzzz, I was having the exact same problem and applying that code changed has fixed it for me. Thought I was going bonkers smiley Thanks for posting the solution here.