University of Manitoba

Contact The University

Search Information

Adding Google Search to your site

1. Insert the following HTML into your web page where you want the search box to appear (parameters in bold can be customized):

<!-- Google Search -->
<form action="http://google.cc.umanitoba.ca/search" method="get" name="gs">
<table cellspacing="0" cellpadding="0">
<tr>
<td valign="middle"><font size="-1">
<input type="text" name="q" size="32" maxlength="256" value=""/></font>
</td>
<td valign="middle">
 <input value="Search" name="btnG" type="submit"/>
</td>
</tr>
</table>
<input value="date:D:L:d1" name="sort" type="hidden"/>
<input value="xml_no_dtd" name="output" type="hidden"/>
<input value="default_collection" name="site" type="hidden"/>
<input value="UTF-8" name="ie" type="hidden"/>
<input value="UTF-8" name="oe" type="hidden"/>
<input value="default_frontend" name="client" type="hidden"/>
<input value="default_frontend" name="proxystylesheet" type="hidden"/>
<!-- Optional Parameters -->
<input type='hidden' name='as_dt' value='i'/>
<input type='hidden' name='as_sitesearch' value='<yoururl>'/>
</form>
<!-- End Google Search -->

Note: If you have been using the Excite search feature on your page, be sure to replace the complete Excite HTML section of your page with the complete Google HTML section above.

2. Customize the following parameters:

  • name='q' size='32'
    Sets the width (in number of characters) of the search box. You can change the size to suit your site's layout, but don't change the maxlength value.
  • name='btnG' value='Search'
    The text that appears on the search button.
    e.g.:"Search Bison Sports"

If you want to restrict your search feature to a specific directory (and its subdirectories), include the following two parameters (as_dt and as_sitesearch).

If you want the search feature on your site to search the entire U of M collection, remove these two parameters from your HTML.

name='as_dt' value='i'
This setting determines whether your search should include or exclude the directory specified in 'as_sitesearch'. Values can be:

  • 'i' (include only results in the web directory specified by as_sitesearch)
  • 'e' (exclude all results in the web directory specified by as_sitesearch)

name='as_sitesearch' value='<yoururl>'
Pages in the specified directory will be included in or excluded from your search (according to the value of 'as_dt').
e.g.:

     name='as_sitesearch' value='www.umanitoba.ca/computing'

  • You must specify the complete canonical name of the host server followed by the path of the directory.
    e.g.:
          www.umanitoba.ca/computing
    not www/computing
  • If the ("/") character is at the end of the web directory path specified, then only files within that directory will be searched and files in sub-directories will not be considered.
    e.g.:
          www.umanitoba.ca/computing to include sub-directories
          www.umanitoba.ca/computing/ to exclude sub-directories

  • as_sitesearch allows allows you to specify one directory (and all its sub-directories) as the domain to be searched—you cannot specify multiple disparate directories using this option

  • If you want the search feature on your site to search the entire U of M web site, delete this parameter.



© 2005 UNIVERSITY OF MANITOBA
University of Manitoba
Winnipeg, MB R3T 2N2 Canada