Search Marker Plugin

When using the EE search module, this plugin will highlight the search terms on the results-page by surrounding them with <span class="marker"></span>.

This plugin is only intended to be used on a search results page, that is, inside {exp:search:search_results}{/exp:search:search_results}.

Step one:
Add the following style to your CSS and modify the color as you see fit.

.marker { background-color#ff0; }

Step two:
Wrap your fields with the plugin tags.

{exp:search_marker}
   
<p>{summary}</p>
    <
p>{body}</p>
{/exp:search_marker}

Download: pi.search_marker.zip
1.62 KB

If you found something useful here and want to show your appreciation feel free to

or


Comments:

1 of 1 pages

A fantastic little plugin so thank you for releasing it to the community.

Best wishes,

Mark

Posted by Mark Bowen  on  04/15  at  11:54 PM

If you wrap the tags around {title}, too. It will be highlited as well.

Posted by  on  01/20  at  11:00 PM

Dear Oliver, thank you for this plugin. What abou highlight titles too?

Posted by  on  01/20  at  09:48 PM

Thanks for this great plugin - very helpful!

Posted by Phil Freo  on  09/27  at  12:45 AM

Another great plugin, thanks.

Posted by  on  09/13  at  03:49 PM

Awesome Plugin.  I’ve been wanting to do this.

Thanks

Posted by  on  08/15  at  02:07 AM

1 of 1 pages