menu   Login

home features pricing search faq library site map policies contact
How To Use Templates
Library > How To > Templates  
Templates allow you to "drop" the search results into a page of your own design. Using this mechanism your search results can look exactly like the rest of your site. This how-to describes how to use a "template" to customize the look of your search results.

Before you use templates, read the template restrictions!

This tutorial is not a web/html primer and assumes that you already know how the process of "web surfing" is accomplished (i.e. a browser requests a page from a server which then returns the page to be viewed), and what an HTML "form" is and how it works. If you are not familiar with these concepts please read a basic web/html primer.

What is a Template
Who Should Use It
Creating a Template
Page Types
Uploading your Template
An Example Template
Template Restrictions
Common Questions

What is a Template?(top)

A template is a great way to customize the look of your search engine results pages. A template is simply an HTML page with special fields. The special fields tell FreeFind where to insert the page contents. This enables you to create a completely customized look and feel.

Who Should Use It?(top)

Professionals and perfectionists! Using templates is more complex than the basic customization options, but if you are an experienced web developer who wants to control the look of the results precisely then this feature is for you.


Using templates is straightforward. The following steps outline the procedure:
  • Create a template,
  • Upload it to your FreeFind account,
  • Repeat as needed!
Creating a template is easy. You just create a regular web page and then tell the search engine where to insert the page title and page contents (search results, site map, etc) by using simple text strings.

If you place your own custom search panel in your template, the default search panel will not be displayed with the search results.

Once your template is finished you need to upload it to the FreeFind server. This is done using the Control Center.

Both these steps are covered in more detail below.

Creating a Template(top)

Usually the easiest way to create a template is to copy an existing page on your site then modify it for use as a template. You will need to make the following modifications:
Replace the page title with "::title::"
Remove the title of your page and replace it with the text "::title::" (without the quotes). This is the location the search engine will insert the page title text before showing it to your visitors (for example, "Search Results", or "Site Map").

Replace the page content with "::content::"
Remove the content of your page (the "stuff" that make that page unique), and then add the text "::content::" (without the quotes) where you want your search results to be located. The search engine will insert the actual search results at that spot before displaying the page to your visitors.

Replace any relative links with absolute ones
All the links on your page - including links to images - need to begin with "http://...". If they don't those links will not work when the page is served from our servers. Because of this all of your links are checked when you upload your template, and if any are relative links instead of absolute links an error message is displayed.

To illustrate, here is what a template might look like:

Note the "::content::" text where the page content will be inserted. Using this template, FreeFind would create a search result page that looks like this:

When that same template is used to create a site map page it looks like this:

As you can see, a single template is used to generate more than one type of page.

Page Types(top)

FreeFind serves up to six types of pages, depending on what features you are using. The same template is used for all six pages, so don't include page-specific items in your template. For example, the text "Search Results" would look a little strange on the Site Map page.

The search engine serves up to six types of pages, depending on what features you are using:
1. Site search, query page - a single site search panel. (example)
2. Site search, search results - the results of a site search. (example)
3. Web search, query page - a single web search panel. (example)
4. Web search, search results - the results of a web search. (example)
5. Site map - an overview of your site. (example)
6. What's new - a list of the recently changed pages on your site. (example)

You can customize the page titles and headings for each page type separately. To do this log in to the Control Center and go the to the customize page. Then use the edit site search text, edit web search text, and edit site map text links.

Uploading your Template(top)

After you have created your template you need to upload it to our servers. To do this log in to the Control Center then go the to the customize page. In the middle of that page, click on the upload custom template link. A "wizard" will appear that allows you to enter the filename of your template. Note that this is a file on you local hard disk, not a web address! After entering the template filename (browsing for it as needed), click on the preview button to quickly get a rough idea of how your search results will look without committing to making the change. If you are satisfied with your template, use the finish button to use the new template.

An Example Template(top)

The following HTML code is a simple template. It creates a page with the headline "". Both the headline and the page contents are centered. Background is black, text color is white.

<BODY bgcolor=black text=white alink=red vlink=yellow link=white>
<font color=white>
<TABLE width=500><TR>
   <TD width="100%">

Template Restrictions(top)

Sponsored (free) accounts

All accounts

No Advertising (free accounts only)
Templates for sponsored (free) accounts may not contain advertising, affiliate programs or link exchange banners. Subscription accounts are free to show advertising.

Due to our contractual obligations to our advertisers, free accounts must not include advertising in their template. Doing so will result in account termination. Of course, you're free to show advertising anywhere else on your site!

If you would like to include advertising in your template, please subscribe.

No Pop-up Windows (free accounts only)
Templates may not include windows that pop-up automatically.

Relative Links
Because the pages are served from the FreeFind servers, all links and image tags must use "absolute" links (fully qualified URLs starting with "http://") rather than relative links in order to work properly. Relative links will simply not work because they will refer to our server instead of yours. This includes all types of links, including image links.

For example the image tag:
    <img src="mylogo.gif">
would not work. The tag must be written as:
    <img src="">
to work.

Of course the same is true of HREFs:
    <a href="contact.html">
will not work. It should be written as:
    <a href=">
to work.

Template Size
Templates are limited to 32K bytes of HTML. Note that this does not include images. You may use as many images as you would like. The limit is only for the HTML part of the page template, not the entire size of the resulting page.

Scripting should be used with care in templates. The only scripting language currently supported is JavaScript. Any JavaScript must not reference external files. Including ".js" files is not supported.

Common Questions(top)

Q. Can I customize my page without templates?
Absolutely. It's fast and easy to customize your page without using templates. Templates simply give you more control. To customize without templates log in to the Control Center then go the to the customize page.

Q. Can I customize elements within the ::content:: block?
Yes. In the customize page all options are available except the ones in the "easy customization" section.

Q. How do use my own search panel instead of the default one?
If you place your own custom search panel in your template, the default search panel will not be displayed.


login home features pricing search faq library sitemap policies contact
FreeFind and are trademarks of
Copyright 1998 - 2017