Penn Computing
Computing Menu Computing A-Z
Computing Home Information Systems & Computing Penn

Simple Search - Additional Variables Customers who are using Server-side Includes or frames and wish to use Simple Search may need to set additonal configuration options.

Very often providers will control the look of their site by using frames or Server-side Includes (SSI) to standardize the header and footer of all pages and will include the actual body of the text in a separate file that is read into the main documents by using either frames or SSI. For example, the Comptroller's site has a document called "map.html". That document is comprised of SSI statements that actually reads in other files like

<!--#include file="map.txt"-->
<!--#include virtual="/comptroller/beta/lib/comptrolFoot.html"-->
When one does a search for a string, the string will actually be found in "map.txt" but the link that the provider would like to attach to the search result should refer the user to "map.html" and not to "map.txt". To accomplish this, the provider can set an option in their search configuration file.

ssiflg The optional "ssiflg" variable specifies that you are including text into your main documents. If you use this option and if the search script finds the search string in a file with ".txt" extension, it will look for a complementary file with a ".html" extension and will set the link on the search results page to the file with the ".html" extension.

Syntax: ssiflg=yes

Sometimes a site will include files that don't have a ".txt" extension. For example, the Research Services site has a document called "notices.html". That document is comprised of SSI statements like

<!--#include virtual="/researchservices/lib/head.html"-->
<!--#include virtual="/researchservices/spmanual/text-notices.html"-->
<!--#include virtual="/researchservices/lib/foot.html" -->
When one does a search for a string, the string will actually be found in "text-notices.html" but the link that the provider would like to attach to the search result should refer the user to "notices.html" and not to "text-notices.html". To accomplish this, the provider can set an option in their search configuration file.
stripfn The optional "stripfn" variable specifies a string that should be stripped from the resulting filename. This should be used for sites that are including files other than files with ".txt" extensions. If you use this option and if the search script finds the search string in a file with the string specified in the optional "stripfn", it will strip that string from the filename and will set the link on the search results page to the stripped filename.

Syntax: stripfn=[string to be stripped]

Example: stripfn=text-

Since you often cannot include a standard <title> tag in your included text file, the search script will be forced to default to the filename when displaying search results. To force a title to display as a linked reference rather than the filename of the searched file when using either the "ssiflg" or "stripfn" variable, you would add a title to your searched files in the following format

<!-- SSITITLE|This is the title|SSITITLE -->



penn web developers

top

Information Systems and Computing
University of Pennsylvania
Comments & Questions


University of Pennsylvania Penn Computing University of Pennsylvania Information Systems & Computing (ISC)
Information Systems and Computing, University of Pennsylvania