Jump to main content or area navigation.

Contact Us

EPA Design, V4

Coding the Search Box

Screen shot of the search results page (in Template 3).

EPA's search engine code provides the choice of searching an area or the entire EPA site. By editing the code where indicated, the search results page includes the area name and contact us link for the area being searched. The results page and any page in Template 4 also provide a link for an advanced search.

Both Template 3 and 4 have the same search code. The relevant portion, i.e., the parts you need to change, of the search code looks like:

<input type="hidden" name="fld" value="YOUR TSSMS HERE" />
<input type="hidden" name="areaname" value="AREA NAME HERE" />
<input type="hidden" name="areacontacts" value="AREA CONTACT US LINK HERE" />
<!-- AREA ADVANCED SEARCH URL HERE (OPTIONAL) -->
<input type="hidden" name="areasearchurl" value="" />

To edit the search code for your specific set-up, please select a link below.


Example Code for Searching a Single TSSMS Area (Topic/Area = one TSSMS)

To search a single TSSMS area, edit the search engine code as indicated in bold. Here we use OWOW as an example:

<input type="hidden" name="fld" value="owowwtr1" />
<input type="hidden" name="areaname" value="Wetlands, Oceans & Watersheds" />
<input type="hidden" name="areacontacts" value="http://www.epa.gov/owow/contact.html" />

Top of page


Example Code for Searching Several TSSMS Areas or Restricting to Subdirectories

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.

Search Several TSSMS Areas

Using NERL as an example:

<input type="hidden" name="fld" value="nerlpage,nerlesd1,nerleerd,heasdweb,asmdnerl" />
<input type="hidden" name="areaname" value="Exposure Research" />
<input type="hidden" name="areacontacts" value="http://www.epa.gov/nerl/comments.html" />

In this example, you are searching multiple TSSMS. You can list as many TSSMS as you need, separating each with a comma.

Searching Subdirectories of One TSSMS

Using OST as an example. In this case, I want to restrict my search to the two "beaches" web sites that OST manages. For the value of the "fld" input, I write: tssmsone|dir1|dir2, where "dir1" and "dir2" are the directories I want to search. The full code is:

<input type="hidden" name="fld" value="ostwater|beach,beaches" />
<input type="hidden" name="areaname" value="Water Science" />
<input type="hidden" name="areacontacts" value="http://www.epa.gov/waterscience/comments.htm" />

In this example, you are searching directories "beach" and "beaches" of TSSMS ostwater. You can list as many sub-directories as you need, separating each with a comma.

Searching Subdirectories of Multiple TSSMS

You can combine the above two search strategies to search specific sub-directories in multiple TSSMS. For the value of the "fld" input, I 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".

Top of page


Other Search Methods

Your filter value may differ. There are four possible values, and all of them will always work:

  1. samplefilt.hts—The original filter. Searches one or more TSSMS, each separated by commas. Cannot search sub-directories or by URL patterns. Superseded by sample4filt.hts, but still works.
  2. sample2filt.hts—Searches for URL patterns. Superseded by sample4filt.hts, but still works.
  3. sample3filt.hts—Allows restrictions to sub-directories, but requires an extra line of code. Example:

    <input type="hidden" name="fld" value="tssms1,tssms2" />
    <input type="hidden" name="url_directory" value="dir1,dir2,dir3" />

    Superseded by sample4filt.hts, but still works.
  4. sample4filt.hts—Allows searches among multiple TSSMS and multiple sub-directories. Can use this filter in all cases.

Top of page

For help with these pages, contact the Web Template Workgroup.

Jump to main content.