Target Files

When Intermapper receives a request for a web page, the requested URL is parsed to determine the target of the request. This target file contains the text content of the desired page. The target file can contain HTML markup if desired.

In addition to the page's text, the target file can contain the following elements:

  • Directives - commands that describe or modify how a page is displayed.
  • Quoted Links - provides a quick way to create a link to another page using its name, rather than specifying its full URL. If a string is in double quotation marks (" ") and the text matches the title of another Intermapper web page, a link is created.
  • Macros - Intermapper variables that are replaced with text or formatted HTML in the final web page. You can place the macro with a static string, a device name or network address, the contents of another file, or other information. Macros are composed of keywords and optional parameters and are enclosed in ${...}.

Target File Example

#title "This is a test page"
This is some text to be displayed in a 
web page. The page's title is "This is a test page", while the remaining
text is displayed in the "body" of the page. The text may also contain
plain text, HTML tagged text such as <b>bold</b> and <i>italic</i>,
and macros, such as the ${date} macro, which displays today's date.
  • The first line is a directive that specifies the title of the page to be displayed.
  • The text between the double quotation marks (" ") is placed in the <title>...</title> tags in the resulting web page.
  • The remainder of this example is placed in the <body>...</body> section of the resulting page. The macro ${date} is replaced by the current date when the page is displayed.

Quoted Links

The text "This is a test page" is displayed as a link to its own page, since it is a string in quotation marks that matches the #title of a web page (its own). Note, too, that the text body can be a link to a page with a title of body. It is not an error if no such page exists and Intermapper displays the quoted string in place. For more information, see Quoted Links.

What Happens When a Target File Is Read?

As the target file is read, Intermapper processes the directives, expands the macros, and creates the tags for any quoted links it encounters. The web server does not insert white space or paragraph marks (such as <p>) when it encounters carriage returns.

Built-In Target Files

Intermapper provides the following built-in target files. These file names all begin with an exclamation point (!) and are required because Intermapper refers to them explicitly.

  • !index.html - displays the default page, when none is specified in the URL.
  • !document.html - displays a graphical image of the specified map.
  • !network.html - displays detailed information about the specified network.
  • !device.html - displays detailed information about the specified device.
  • !link.html - displays detailed information about the specified link.
  • !chart.html - displays the specified strip chart.
NOTE:

The !network.html, !device.html, !link.html, and !chart.html files are targets intended to display information about a specific network, device, link, or chart. The macros that display lists of maps, networks, devices, and charts create links to these targets. The easiest way to create custom versions of these targets is to edit them directly.