Live Search Plugin

Jul 29, 2008 - 07:36 PM4 Comments

If you’ve tried out my search form, you know what it does.  It’s dead simple to use as well:

Usage

1. Download and install the plugin.
2. Make an empty template - I called mine livesearch - and put the tag in there:

{exp:live_search:results link="comment"}

3.  Add the included css and js files to the page with your searchbox on it.
4.  Tell the javascript where to go:

// The trailing slash is important
$('#keywords').livesearch('/search/livesearch/');

Pretty simple really.  Style it to fit your site, and you’re done.

Parameters

link="comment” - In the original forum thread Paul’s link used the ‘blog url’ weblog path.  I needed mine to go to the ‘comment url’ path.  Easy fix - support both.  It defaults to blog_url, but “comment” will make it go to your comment page.

I’m open to suggestions for more options.