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:
- in the same frame as the search results list
- in another frame with a specific name
- in the full screen (target _top)
- 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:
In older versions it looks slightly different, but it means the same thing:
1. To open pages in the same window as the results list, simply delete "$target" if it exists:
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.
Between versions 2.0.0.0005 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 2.0.0.0033 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 2.0.0.0023. 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.
"Using frames in search results" https://www.xav.com/scripts/search/help/1028.html