Topics

highlight modifer

The highlight modifier attempts to highlight the passed text containing the requested term.

{$result->body|highlight:$terms}

would <span> highlight any $terms found in $result->body.  The default highlighting is a yellow background, but you may pass an additional parameter for the background.

{$result->body|highlight:$terms:'style="background-color:red;"'}

 

Loading Help