Configuring the Search Results Template (data\SearchTemplate.html)

What is SearchTemplate.html?

When a user performs a search, the results are sent back as a web page.  To configure the way the results are presented, you can edit SearchTemplate.html.  This file is very similar to a normal web page, except for several special sections that will be used by the search program.

How to modify/create your own SearchTemplate

Because the SearchTemplate.html has special sections, it will not look normal in a WYSIWYG editor like MS FrontPage.  You should edit the HTML by hand.  Unless you are going to drastically change the appearance of the page, it should not be hard to tweak small options like colors/fonts, inserting logos, etc. 

The "Special Sections" of the SearchTemplate

Every section is actually a comment within the HTML file.  These lines are modified by the program to produce specific search output.  Every section starts with "<!--sectionname>" and ends with "</sectionname-->".  The lines inbetween are modified by the program.

searchdb & searchopt

This section is for the drop-down box that selects which database to search or what size file to search for.  The text of the search options should match whatever you use on your main search page.  However, we want the user's previous selection to be selected on the search results page.  Instead of writing "<option value="#"> we put "<option value="#"%s>. 

searchheader

This defines the appearance of the header that is at the top of the search results file.  There should be three lines, each one with a "%s" in it where you want the appropriate text to appear (Filename, Folder, Size)

searchresult

A three-line section that will control the appearance of the results that are printed. The first line should have "%d. %s" and the %d will be replaced with the result number and the %s will be replaced with the filename.  The second line should have a %s that will be replaced with the text of the folder/directory name.  The third line has a %s that will be replaced with the file size.

searchcontinue

This one-line section is displayed when there are more search results.  This should be a link with the HREF set to: <A HREF="%s"> and %s will be replaced with the link to the next page of results.

searchdone

This one-line section is displayed when there are no more search results.  There should be a "%d" somewhere in this line that will be replaced with the number of search items found.