The Drupal in built search is ok for most things, but wouldn't you want something a bit better? How about a search that doesn't just search the titles? How about a list that appears as you type?
You can add some modules to do this, the first we will use is called Finder
First of all install the module in the usual way making sure you enable all the Finder modules except Finder String Translation (this is used on multilingual sites).
Now, we want to have Finder used instead of the normal Drupal search and have a dropdown as the user types.
If you've followed along you should have used ImageCache for your images. We'll use that to create a new image for Finder to use. If you don't have ImageCache click here to find out how to install it.
Now to create a nice small image to use for Finder
We now have an image preset we can use for the Finder Autocomplete list
Now we need to configure the Finder
At this point we have a basic Finder in a block ready to add to the site but it won't do anything until we add an element.
If you've moved off the page go to www.example.com/admin/build/finder/1/edit
Now all we have to do is move the block containing the search into the header. To do this:
Now we will add the code to make the list appear as we want it. Open cPanel and File manager (or your editor of choice)
It all works now as it should but now we need to format it
Now we need to make the new search look and feel right so
There is an error with the Finder module that causes problems for your users / customers. When a user types something into the search box the module will go up to the database and try to finish what the user is typing; called Autocomplete. If the user submits before the results come back from the database an error is created and shown to the user. This, to any user, looks like the site is bugged and can end in a user not trusting the site.
There is an easy fix for this as shown here
Open .../finder/modules/finder_autocomplete/finder_autocomplete.js and at around line 295 change this:
{syntaxhighlighter brush: jscript;fontsize: 100; first-line: 1; }}, error: function (xmlhttp) { alert(Drupal.ahahError(xmlhttp, db.uri));{/syntaxhighlighter}
to this:
{syntaxhighlighter brush: jscript;fontsize: 100; first-line: 1; }/*}, error: function (xmlhttp) { alert(Drupal.ahahError(xmlhttp, db.uri));*/{/syntaxhighlighter}
The creators of the module think this is okay because it is a Drupal error handler, not a Finder handler, I, like my users, think this is a usability problem and an error handler too far! So, each time you upgrade the module you must redo this.
Contact me here or catch me on one of
the social networks below
Try this on your mobile
You should be able to use this right from the screen
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
|
|
|
|
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
|
|
|
|
Copyright David Slack - Web developer