Skip navigation

STANFORD UNIVERSITY

INFORMATION TECHNOLOGY SERVICES

Front Ends

Overview

Front Ends allow search administrators to create different search and search results pages by editing their XSLT stylesheets. Administrators can also edit their KeyMatch, Synonym, and Filter information, or remove URLs from a Front End.

  • KeyMatch lets you promote specific web pages on your site by associating specific search terms, such as operations, with a set of web pages.
  • Synonyms can be used to suggest alternate words or phrases for search queries.
  • Filters can restrict searches based on domain, language, file types, or meta tags.
  • Removing URLs from a Front End prevents particular URLs from being served in search results.

Request a new Front End

Enter a HelpSU request indicating the name of the Front End and the site URL that will be using the Front End. The Front End name must be alphabetic and in all lower-case without spaces. Upon receiving your request, the Stanford Google team will provide you with a Front End name and a Google Appliance account.

Add the Front End parameter to your search feature's HTML

<form method="get" action="http://ask.stanford.edu/search">
<input type="text" name="q" size="32" maxlength="255" value="" />
<input type="submit" name="btnG" value="Search" />
<input type="hidden" name="client" value="stanford" />
<input type="hidden" name="proxystylesheet" value="front_end_name" />
<input type="hidden" name="site" value="<stanford>" />
<input type="hidden" name="output" value="xml_no_dtd" />
</form>

Edit the Front End's Output Format

  1. Login to the Google Search Appliance
  2. Click Serving on the left sidebar and select Front Ends to see the list of Front Ends that you maintain.
  3. Click Edit beside the Front End that you would like to edit.

Google provides two methods of modifying your XSLT stylesheets.

Page Layout Helper

It is highly recommended that you use the page layout helper first before using the XSLT Stylesheet Editor. The Page Layout Helper modifies the XSLT stylesheet with a WYSIWYG interface. Enter the following values to achieve the Stanford default look and feel or modify the header and footer HTML code with HTML from your site's web templates to achieve a customized look and feel.

  1. Click on the right arrow in front of the section you want to open.
    • Global Attributes
      Logo:
        pixels     Height: pixels


      Enter your web site's HTML header code below:
       

      Enter your web site's HTML footer code below:
       

    • Search Box
      characters

       

      Collections: Include a menu to search by collection

      Include radio buttons to allow search over public or secure documents
    • Search Results
      Include:



      Blue bar Gray line No divider





      Image of Goooogle previous/next selector

      Image of previous/next selector


  2. Click the Preview button to preview changes in a separate window.
  3. Click the Save Page Layout Code button to save changes to the XSLT stylesheet.
  4. Customize and test the stylesheet (see notes below)

XSLT Stylesheet Editor

Google provides a text editor for those who would like to edit their XSLT stylesheets directly. The Stanford Google Team does not officially support this feature. Use the XSLT Stylesheet Editor at your own risk.

Sections of the stylesheet are labelled according to what they affect, and marked either "can be customized" or "do not customize". We strongly recommend you follow these guidelines.

<!-- *****************************************************
Logo setup (can be customized)
- whether to show logo: 0 for FALSE, 1 (or non-zero) for TRUE
- logo url
- logo size: '' for default image size
********************************************************* -->
<xsl:variable name="show_logo">1</xsl:variable>
<xsl:variable name="logo_url">images/Title_Left.gif</xsl:variable>
<xsl:variable name="logo_width">200</xsl:variable>
<xsl:variable name="logo_height">78</xsl:variable>

After you edit the underlying XSLT code you cannot use the Page Layout Helper unless you restore the default stylesheet.

Notes about customization and testing

The Google Search Appliance caches XSLT stylesheets. The XSLT stylesheet changes will not be reflected until the Google Search Appliance cache is updated. Perform a search with the "proxyreload" search parameter in your site's search form to force a reload of the XSLT stylesheet.

<input type="hidden" name="proxyreload" value="1" />

Since forcing a stylesheet reload will slow down the display of the search results, you should remove the "proxyreload" search parameter when you are ready to publish your site.

Help

Minimal technical support is available for custom stylesheets. Please send your questions to search-partners@lists.stanford.edu. Visit the Google Help Center for further assistance.

Last modified Friday, 15-Sep-2006 02:11:55 PM

Stanford University Home Page