]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/opac/search_form.txt
b16e5370cb821abcf0e121834bbfdde9f33ad7a2
[Evergreen.git] / docs / opac / search_form.txt
1 Adding an Evergreen search form to a web page
2 =============================================
3
4 To enable users to quickly search your Evergreen catalog, you can add a
5 simple search form to any HTML page. The following code demonstrates
6 how to create a quick search box suitable for the header of your web
7 site:
8
9 .Sample search form
10 [source,html]
11 ------------------------------------------------------------------------------
12 <form action="http://example.com/eg/opac/results" method="get">    <!-- <1> -->
13     <input type="search" alt="Catalog Search" maxlength="200"
14             size="20" name="query"
15             placeholder="Search catalog for..." />
16     <input type="hidden" name="qtype" value="keyword" />           <!-- <2> -->
17     <input type="hidden" name="locg" value="4" />                  <!-- <3> -->
18     <input type="submit" value="Search" />
19 </form>
20 ------------------------------------------------------------------------------
21 <1> Replace ''example.com'' with the hostname for your catalog. To link to
22     the Kid's OPAC instead of the TPAC, replace ''opac'' with ''kpac''.
23 <2> Replace ''keyword'' with ''title'', ''author'', ''subject'', or ''series''
24     if you want to provide more specific searches. You can even specify
25     ''identifier|isbn'' for an ISBN search.
26 <3> Replace ''4'' with the ID number of the organizational unit at which you
27     wish to anchor your search. This is the value of the ''locg'' parameter in
28     your normal search.