Contextual Search Madness

I added Y!Q contextual search to the blog, as you can see below. (Clicking on the soothing purple and yellow link gives you a dynamic HTML pop-up; it won’t take you away from this page, so click to your heart’s content to see how it works.)

This was not difficult to add to Typepad. The instructions here will help you get started. The only Typepad/Movable Type-specific information you need to know is:

  1. The JavaScript link should be included on the main template, the individual template, the category template, and the date-based template (if you use them; I don’t).

  3. The hidden control that provides context (by passing a blurb of text to the Y! search engine) behaves well if you pass it the "entry excerpt" of your blog post. In the Movable Type templating language, the tag looks like this:

    <input type="hidden" name="context" value="<$MTEntryExcerpt$>" />

I would be remiss if I did not mention that there is also a contextual search API for developers who want to integrate contextual search in other contexts.