Customizing the Search Interface
Chapter
12
Using Search
283
You can create a complete search function as an HREF element within a pattern
file. The example given is from the
HTML-descriptions.pat file
, which defines
how collection information is displayed. The following lines produce a heading for
each collection with the label (“Collection:”), and provide a link to the actual
collection file through the collection’s label (
NS-collection-alias
) defined in the
dblist.ini
file.
<td colspan=6><font size=+2><b>$$collectionLabel</b>
<a
href=$$NS-server-url/search?NS-collection=$$NS-collection>$$NS-c
ollection-alias></a>
</font></td>
The HREF contains a complete search function by using the following elements:
•
$$NS-server-url
: A search macro that determines the user’s server URL.
/search
: The search command itself.
•
?
: The query string indicator. Everything after the ? is information used by the
search function.
•
NS-collection=$$NS-collection
: This uses the search macro
$$NS-collection
to define the collection’s filename.
You can set up a search to use a variable conditionally; if there is no value
associated with the variable, nothing will be displayed. The syntax is as follows:
variableName[conditionalized output]
For example, you could request that the document’s title be output if it exists. If
there is no title for this document, not even the label “Title:” is to be displayed. To
do this, you might enter:
$$Title[<PTitle: <B$$Title</B]
URL Encodings
When you construct HTML instructions, whether in decorated URLs or within a
pattern file, you need to follow the rules for URL encoding. Any character that
might be misunderstood as part of a URL should be encoded with the format of
%nn format, where nn is a hexadecimal code. Blanks are converted to the + symbol
(plus sign) in queries or to %20 in output. The following table shows the most
commonly used URL codes.
Summary of Contents for NETSCAPE ENTREPRISE SERVER 6.0 - ADMINISTRATOR
Page 1: ...Administrator s Guide Netscape Enterprise Server Version6 0 November 2001...
Page 18: ...18 Netscape Enterprise Server Administrator s Guide November 2001...
Page 26: ...26 Netscape Enterprise Server Administrator s Guide November 2001...
Page 48: ...Migrating a Server 48 Netscape Enterprise Server Administrator s Guide November 2001...
Page 50: ...50 Netscape Enterprise Server Administrator s Guide November 2001...
Page 146: ...146 Netscape Enterprise Server Administrator s Guide November 2001...
Page 242: ...242 Netscape Enterprise Server Administrator s Guide November 2001...
Page 294: ...294 Netscape Enterprise Server Administrator s Guide November 2001...
Page 332: ...Deleting a Virtual Server 332 Netscape Enterprise Server Administrator s Guide November 2001...
Page 378: ...378 Netscape Enterprise Server Administrator s Guide November 2001...
Page 396: ...Responses 396 Netscape Enterprise Server Administrator s Guide November 2001...
Page 414: ...Posting to JSPs 414 Netscape Enterprise Server Administrator s Guide November 2001...
Page 432: ...Further Information 432 Netscape Enterprise Server Administrator s Guide November 2001...
Page 444: ...444 Netscape Enterprise Server Administrator s Guide November 2001...