• Issues with highlighting on SimpleSearch#

  • neilp123 Reply #1, 10 months, 1 week ago

    Reply
    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?!


  • joyzzz Reply #2, 4 months, 3 weeks ago

    Reply
    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


  • joyzzz Reply #3, 4 months, 3 weeks ago

    Reply
    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 .


  • hsteel Reply #4, 4 months, 3 weeks ago

    Reply
    Thanks Joyzzz, I was having the exact same problem and applying that code changed has fixed it for me. Thought I was going bonkers Thanks for posting the solution here.