CERN Accelerating science

This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.

next up previous
Next: Current Status of XML Technologies Up: cnl232.html Previous: Software for IT-Web-Server: Going Apache

Searching Information in your Web Pages

  José Carlos Fernández Rodríguez IT/Web Office


An enhanced search facility is provided by the Web Office. If you are responsible for a self-contained set of Web pages, you can provide users with a form for searching in those pages and in only those pages. In addition, you can take control over the way search results are presented to the reader.

In order to do this, you have to include an HTML form that will display a search prompt in any page of your choice contained in the root directory of your set of pages, typically the main or the welcome page. You can take a look at our "Example Page" in:

http://www.cern.ch/WebOffice/Doc/Search/sub-search.html

In that page, you can find a sample form. You can cut that form and paste it wherever you want in your pages. As our search engine (Ultraseek by Infoseek) indexes pages by following links, your pages are most probably indexed already, so everything should be working and users should be able to search for words and phrases throughout your pages.

If you want to customize the search results' layout according to the same general look of the rest of your pages, you need to write a new page called .searchresults.html which must be in the same directory as the page with the search form. In the place of this page where you want the search results embedded, you must include the following HTML comment:

  <-- #SEARCHRESULTS# -->

If you want to use a different name than .searchresults.html just change the value of the INPUT element whose name is TemplateFile in the form. For example, you can use

  <INPUT NAME="TemplateFile" TYPE="hidden" VALUE=".my-layout.html">

instead of the default value.

This new service is already being used by several people (examples include the Web Office and the CERN Public Web Pages).


next up previous
Next: Current Status of XML Technologies Up: cnl232.html Previous: Software for IT-Web-Server: Going Apache

Cnl.Editor@cern.ch