Home > Fluid Dynamics Search Engine > Help > 1028

Using frames in search results

When visitors open the pages returned by their search, you may want the pages to open in a specific frame. This help topic describes how to control that frame, known as the target frame or destination frame.

The new page can open:

  1. in the same frame as the search results list
  2. in another frame with a specific name
  3. in the full screen (target _top)
  4. in a new window (target _blank)

The search engine works the same regardless of the destination frame. Thus, there are no search settings controlling frame targeting. To set the destination frame, you simply edit the HTML text of the "line_listing.txt" template which is located in "search/searchdata/templates".

After opening the template file, find the link visitors use. It looks like this:

	<a href="%Redirector%%URL%">

In older versions it looks slightly different, but it means the same thing:

	<a href="$Redirector$URL"$target>

1. To open pages in the same window as the results list, simply delete "$target" if it exists:

	<a href="%Redirector%%URL%">

2. To open pages in a specific frame, such as FooFrame, use:

	<a href="%Redirector%%URL%" target="FooFrame">

3. To open pages in the full screen, use:

	<a href="%Redirector%%URL%" target="_top">

4. To open pages in a new window, use:

	<a href="%Redirector%%URL%" target="_blank">

Note: if you are using a global <base target="something" /> tag elsewhere in your HTML, then always use syntax 2-4. The initial syntax may not work properly.

Version Info

Between versions and 0032, a setting named "strTarget" contained the text of the TARGET name-value pair. It had a default value of "target=_top". It was inserted into the template using the "$target" variable name. The "strTarget" setting was removed in version in favor of users directly editing the "line_listing.txt" template. The method described above works for all versions because it bypasses the "$target" variable entirely. This method is preferred for all versions where "line_listing.txt" is available.

The "line_listing.txt" template was not available prior to version In those early versions, the search results list was generated directly from the function StandardVersion. Users of those versions must continue to use the "strTarget" setting.

See also: Customizing HTML: How to use variables in templates

    "Using frames in search results"