We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40122
    • 330 Posts
    I want to use &highlightResults as shown in the RTFM to add a class to the keywords that appear in the results. However, this doesnt seem to work.

    My snippet call looks like:

          [[!SimpleSearch?
                &ids=`21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,44,22`
                &idType=`parents`
                &tpl=`SearchResultTpl2016`
                &containerTpl=`SimpleSearchContainerTpl`
                &highlightResults=`1`
                &includeTVs=`1`
                &processTVs=`1`
                &showExtract=`1`
            ]]


    I tried adding:

    &highlightClass=`sisea-highlight`
    &highlightTag=`span`
    

    as well but it made no difference.

    Would anyone know what I'm doing wrong here?
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      What are the contents of the SearchResultTpl2016 tpl?

      use a placeholder for the classes

      i.e.

      [[++sisea-highlight]]
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster