MS FrontPage

Letting Visitors Search Your Site

By now, your Web pages are brimming with interesting information, and you've organized your site so that visitors can find what they're looking for. Still, most savvy Web travelers these days will be on the lookout for one particularly handy navigational tool: the Web site search box. You can satisfy them by adding a gizmo that FrontPage calls the Web Search Component, which lets visitors enter keywords and search all the text on your site.

How a Search Works

A basic "site search" functions like this: you provide a field (a box) for visitors to enter their search term or keyword(s). A visitor types in a word or two and clicks the search form's Submit button. Then the Web server sends search results back to the visitor's browser. Results appear as a list of files (mostly Web pages, but results might also include PDFs or other types of files) in your site containing the term she entered. Each item in the list is a hyperlink that the visitor can click to open that page.

If you want to use FrontPage's Web Search tool, your live Web server needs to be running FrontPage Server Extensions (Things to know before you publish). If your server's loaded with SharePoint Services, you'll use FrontPage's full text search component instead. (See step 1 in the instructions that follow.) Full text search is Microsoft's "new and improved" version of the Web search, designed to deliver more accurate results.

Creating a Search Component

To add a search box to your site:

  1. Create a search box.

    Insert a site search box in one of two ways:

    • If you want to add a search box to a page that already exists, place your cursor where you'd like to put the search box. Select Insert » Web Component. Within the Insert Web Component dialog box that appears, select Web Search from the list on the left. In the pane on the right, select Current Web and click Finish.


      If you have SharePoint on your server, select Full Text Search instead of Current Web.
    • If you want to dedicate an entire page to your Web site search form, select File » New and, in the New task pane, click "More page templates." Double-click the Search Page template. FrontPage creates the search page.

  2. Set Search Form Properties (Figure 16-1).

    In this step, you can configure the search buttons and text box and tell FrontPage how to format search results. If you used the Insert Web Component dialog box to create your search form, the Search Form Properties box displays. On the other hand, if you used the template, right-click inside the search form and select Search Form Properties (or, just double-click inside the form).

    Figure 16-1. The first tab in the Search Form Properties dialog box lets you set the form's appearance. Edit the label here for your search field and form buttons. You can also adjust the length of the search field by entering the number of characters that will be visible. As with any other form, entering a number in the "Width in characters" box doesn't change the characters a visitor can enter, just those that will display in the box.

  3. Configure search form results.

    Click the Search Results tab. Here, you'll set what results the search should return and how they'll display. You have control over the following settings:

    • Word list to search. If you want visitors to search your entire site, leave this box set to All. If you want them to search only a subsite or subfolder, type the name of the folder here.


      FrontPage automatically excludes any folder name preceded by an underscore (like _private) from a search.
    • Date & Time format. Search results automatically display the last edited date of files returned. Select the format you prefer from the date and time format lists. If you don't want any date or time to display, select None in each list.

    • Display score. If you turn on this checkbox, FrontPage assigns and displays a search relevance score next to each page a search returns. The score shows the relevance of the file to the search criteria.

    • Display File Date. If you don't want "last edited" dates listed next to each file the search finds, turn off this checkbox.

    • Display File Size. If you want to let visitors know the size of each page their search returns, turn on this checkbox.

  4. Click OK and save the page containing your search form.

  5. Publish (Publish Your Site) and test the form.