Setting up search and result pagesBefore you can deploy ht://Dig, you are encouraged to edit its page templates to conform to the look-and-feel of your website. Those page templates include: ../htdig/search.htmlThe default search page with option lists to control sort order, boolean settings, and format (long or short). If you prefer, you may simply add a form to one of your existing website pages to interface with the ht://Dig database. ../htdig/common/footer.htmlThe template that formats the page previous, page list and page next links at the bottom of the search results page. ../htdig/common/header.htmlThe template used to render the results page when matches are found. ../htdig/common/long.htmlThe template used to format long result returns. Long results include page titles and snippets of the body text where matches were found, with matches shown in bold. ../htdig/common/nomatch.htmlThe template used when a search does not find any matching documents. ../htdig/common/short.htmlThe template used to format short result returns. Short results only show page titles. ../htdig/common/syntax.htmlThe template used to display an error message when the user enters a search string that does not follow the defined ht://Dig search syntax. Each one of these page templates include htdig variables which appear in the following format: $&(VARIABLE)
You are free to change where these variables appear within a given template (just be careful not to edit them in any way). Note: As our servers parse all documents as PHP, you are free to use PHP include files within (or in lieu of) the default ht://Dig templates.To add a search form:Do one of the following:
<form method="post" action="/cgi-bin/htsearch"> <input type="hidden" name="config" value="htdig"> <input type="hidden" name="restrict" value=""> <input type="hidden" name="exclude" value=""> <input type="text" size="20" name="words" value=""> <input type="submit" value="Search"> </form> To customize the results page:Edit the relevant ht://Dig templates listed above. |
|