PDF Disclaimer
You will need Adobe Acrobat Reader to view PDF files. See EPA's PDF page for more information about getting and using the free Acrobat Reader.
Site Help
Topics
 Glossary
 Site Map
Many links on the Web Guide are available to EPA Intranet users only. If you are an outside contractor working for EPA, please contact your EPA representative for more information. If you are another federal agency or other party interested in EPA's web policies and procedures, please contact EPA through the "Contact Us" page on this site.
Questions?
Web or WebCMS Questions?
Email the EPA Call Center
1-866-411-4EPA (4372).
Computer Questions?
Call CTS
1-866-955-4CTS (4287).
Coding the Basic Search Form
A search box that searches your program web content is a standard element of content pages on both public access and the intranet. On public access, this search box is included in the agency standard web template.
While we often refer to your area's content as a collection, there is, in fact, only one physical collection for public access, and one for intranet. Search is restricted to that part of the collection that belongs to you by "filtering". Filtering works by matching one or more piece of text to codes in the collection that are unique to your area. A filtered search is referred to as an "area search".
Note: When web pages are converted into the new Agency structure, the search box will be coded to search the entire EPA collection&mdashthere will be no Area filtering.
Coding your search form
Search is implemented in content pages using an HTML form. The same rules apply for forms in static and dynamic content.
- All parameter names must be in lower case.
- Parameter values may not contain
<
, >
, &
\.
- Use commas or vertical bars (|) to separate multiple terms in the value.
To edit the search code for your specific set-up, please select a link below.
Required Search Parameters
The fields below are required both for intranet and public access search forms.
Required Search Fields
Name |
Values |
Comments |
typeofsearch |
area
epa |
Use area to search only your area, epa to search entire agency |
areaname |
The plain English name of your area as it should appear in the search results. |
Keep it short! No ampersands (&). |
filter |
Sample4filt.hts |
See Choosing and Coding a Filter section. |
fld |
tssms or URL string |
Separate multiple values with commas. See Choosing and Coding a Filter section |
result_template |
epafiles_default.xsl (for public access)
agcyintr_default.xsl (for intranet)
custom |
Extensible style language stylesheet to render results. |
querytext |
|
Textbox for entering search terms |
Top of Page
Optional Search Parameters
The fields below are optional both for intranet and public access search forms. Do not specify the parameter if you are accepting the default.
Required Search Fields
Name |
Values |
Comments |
areacontacts |
A valid URL |
If present, this will be the link for "Contact us" in search results. If not present, "Contact us" will link to the Agency contact page. |
areasearchurl |
A valid URL |
If present, this will be the link for "Advanced Search" in search results. If not present, "Advanced Search" will link to Agency advanced search. |
doctype |
all | html | pdf |
Controls the type of document to return. Default is all. Use all except in special cases, since the user will have the opportunity to refine from the search results page. |
sort |
term_relevancy date |
Controls ordering of search results. Default is relevancy. |
xml |
no yes |
Controls whether results are in XML format, or in HTML for visual presentation. Default is "no". "yes" is typically used by applications requesting results in machine-readable format. |
stylesheet |
Custom stylesheet name |
Overrides the default EPA public access or intranet stylesheet |
Top of Page
Choosing and Coding a Filter
Choosing a Filter
A note about filtering and preferred URLs
Prior to the implementation of Google Search Appliance search, the choices for filtering were TSSMS, URL and a combination of the two. The Google Search Appliance is not configured to index TSSMS, so requests for TSSMS filters are internally translated to URL filters on the corresponding preferred URL.
We update the preferred URL daily to reflect changes to aliasing and user-selected alias preferences. It is neither required nor recommended that you convert from TSSMS filtering to URL filtering at this time. The advantage to retaining TSSMS filtering is that we will keep the preferred URL current, so you do not have to update your search form when you change your alias structure.
The important thing to know for both URL and TSSMS filtering is that we only index and search preferred URLs. You must specify a preferred URL if a. you have more than one alias for a directory and b. you have not already done so. You must also enforce consistent linking that always used the preferred URL. Failure to do either of these will result in incomplete or missing Area Search results.
For more on indexing, searching and aliasing, see the Google Search Appliance at EPA wiki.
sample4filt.hts
is the preferred filter for area search. For historical purposes, we still support the previous versions of our filter: samplefilt.hts, sample2filt.hts
and sample3filt.hts. sample4filt.hts
supports all features of earlier filters.
To filter with sample4filt.hts
, code the following in your search form:
<input type="hidden" name="filter" value="sample4filt.hts" />
To specify which content should be in included, specify values for the hidden field fld
:
<input type="hidden" name="fld" value="
see table below for value" />
. More concrete examples are available.
Values for fld
parameter when using sample4filt
One tssms |
tssms001 |
Multiple tssms |
tssms001,tssms002,tssms003 |
One directory in one tssms |
tssms001|dir1 |
Two directories in one tssms |
tssms001|dir1|dir2 |
Two directories in one tssms and one directory in a second tssms |
tssms001|dir1|dir2,tssms002|dir3 |
Two directories in one tssms and all of a second tssms |
tssms001|dir1|dir2,tssms002 |
Either of two directories, regardless of tssms |
|dir1|dir2 |
Top of Page
Examples of Search Coding
Searching a Single TSSMS Area (Topic/Area = one TSSMS)
To search all of a single TSSMS area, edit the search engine code as indicated in bold. Here we use OWOW as an example. OWOW's TSSMS account is owowwtr1
:
<input type="hidden" name="fld" value="owowwtr1" />
<input type="hidden" name="areaname" value="Wetlands, Oceans & Watersheds" />
Top of page
Searching Several TSSMS Areas
Programming Note
This type of search is especially relevant for sites and pages that cover broad topic areas, like "water" or "air". Pages for these broad topics or for Program Offices like Water or Air should include all of the "water" or "air" TSSMSs.
To use Water as an example: a user coming to EPA's Water site would expect to search among all water documents/sites, not just the watrhome
TSSMS (documents belonging to OW-IO). It's not strictly office-based, however. In the Office of Water, the American Indian Environmental Office has more than just water-related content. It would probably not be part of the overall "Water" search. Instead, it would be part of the Tribal Portal search.
Further Note: While Water encompasses OWM and OWOW, OWOW should not include OWM.
These are not hard and fast rules. The goal of site search is to make it easy for our users to find our content. A more topic-based, rather than office-based, definition of an area is preferable.
To search multiple TSSMS areas or to restrict your search to sub-directories within one or more TSSMS, edit the search engine code as indicated in bold with your own TSSMSs.
Using NERL as an example. NERL consist of many different labs, and each lab has their own TSSMS. Here we show how to search all of the related labs TSSMSs:
<input type="hidden" name="fld" value="nerlpage,nerlesd1,nerleerd,heasdweb,asmdnerl" />
You can list as many TSSMS as you need, separating each with a comma.
Top of page
Searching Subdirectories of One TSSMS
In this case, we want to restrict our search to subdirectories in one TSSMS account. Using OST as an example: OST manages two "beaches" web sites. For fld
input, we write: tssmsone|dir1|dir2
, where "dir1" and "dir2" are the directories we want to search:
<input type="hidden" name="fld" value="ostwater|beach,beaches" />
In this example, we are searching directories "beach" and "beaches" of TSSMS ostwater. You can list as many sub-directories as you need, separating each with a comma.
Top of page
Searching Subdirectories of Multiple TSSMS
You can combine the above two search strategies to search specific sub-directories in multiple TSSMS. For fld
, write tssms1|dir1|dir2,tssms2|dir3
, where "dir1" and "dir2" are the directories I want to search in "tssms1" and "dir3" is the directory to search in "tssms2".
<input type="hidden" name="fld" value="tssms1|dir1|dir2,tssms2|dir3|dir4" />
If you want to search all directories named "celebrations", no matter the TSSMS account, you can:
<input type="hidden" name="fld" value="|celebrations" />
![Top of Page](https://webarchive.library.unt.edu/web/20130224052703im_/http://yosemite.epa.gov/OEI/webguide.nsf/top.gif?openimageresource)