beautypg.com

Presenting the search interface in an inline frame, Integrating search into web pages – Google Search Appliance Creating the Search Experience User Manual

Page 115

background image

Google Search Appliance: Creating the Search Experience

Advanced Customization Topics

115

Integrating Search into Web Pages

If your goal is to integrate search into existing web pages that have a particular style and identity, you
can modify or minimize the visual effect of the default search and results pages. This section describes
three levels of integration:

A basic approach that presents search pages in an inline frame.

An HTML form search box that replaces the default search page.

A combination of an HTML form search box and results pages in an inline frame within the page.

Presenting the Search Interface in an Inline Frame

Using inline frames, you can present the search interface within the context of an otherwise static web
page as illustrated in the “Inline Frame Example page” on page 114.

HTML Code for Integrating Search with an Inline Frame

The integrated search interface in the example page is derived from an inline frame tag with a src
attribute pointing to iframe-example-frontend. As shown below, the inline frame is presented within a
table cell:




Search our extensive database of flies:




At a minimum, the source attribute for an inline frame tag must specify the protocol and search
appliance hostname, http://appliance_hostname. If you provide only the hostname, the default front
end search interface appears in the inline frame.

In the inline frame example, the source URL contains custom query parameters to load the front end
named iframe-example frontend, which is customized for optimal display of the search interface in an
inline frame. The front end includes XSLT code that makes the search button submit selected
parameters that affect the display of the search results page. For more information, see “Specifying
Query Parameters with XSLT” on page 121
and the Search Protocol Reference.

Adding Inline Frame Search to a Page

To add the search interface inside an inline frame in a web page:

1.

Open the page to be modified in your preferred editor.

2.

In the section of the page where you would like to display the search interface, add an inline frame
tag.