I want to allow developers to implement filtering by a certain node type in the search results. It looks like this is easy to do by simply passing along an appended " type:NODE_TYPE" string to the search keys/string when it is being sent to the server by JS. This approach woudl allow develoeprs to override the inline_ajax_search-theme-form.tpl.php to include whatever node type filter they want by simply adding an INPUT element (type="hidden").

You could possibly take this a step farther and change it to allowing ANY arbitrary filter string to be appended (from the value of the hidden INPUT elem).

Comments

greenmachine’s picture

Here is a patch with suggested implementation.

fabianderijk’s picture

Status: Active » Needs work

This looks great. This patch only has the JS in it. The hidden form field also has to be added in the form itself. Could you provide with a patch for that as well?

Juan C’s picture

I want this patch as well for d7. Anyone?