Macro Reference
A macro is a text string with the format ${macroname:other-information}. The macroname is required and some macros use or require other-information that follow the colon (:). The entire macro is replaced by the appropriate text when the page is generated.
Macros can fall into one of the following categories:
- The Include Macro
- Macros that generate "content" on an Intermapper web page
- Macros that describe Intermapper and its environment
- Macros to place images onto a page
- Macros that control the interval between page refreshes
- Macros related to links and URLs
Include Macro
Your template files and target files might include other files.
the named file is inserted into the web page. The file must be in the same folder. |
Macros That Generate Content of an Intermapper Web Page
Intermapper often uses these macros either as the ${bodytext} of the page or as a major part of a page's contents. All macros below work on the map named in the request URL. If the URL is for a page in the ~admin directory, Intermapper displays information about all items in all maps.
Miscellaneous Macros That Describe Intermapper and Its Environment
${abouthtml} |
Shows the About page with the current version of Intermapper. |
${date} |
The current date. |
The IP or AppleTalk address of the particular device. For anything that is not a device, an empty string is returned. |
|
Outputs the device identifier of the device related to the current page, in the "gMMMM-rNN" format. If the current page is not device-related, output "". |
|
${devicelist_kml} |
Generates a device list in KML format for use by Google Earth. |
Outputs a table showing the device list for the current context. The table's columns are Status, Name, Condition, Date, Time, Probe, and Port. Within an administrator context, ${devicelist} generates a list of all devices. In a per-map context, ${devicelist} generates a list of devices from the current map. |
|
The DNS name or AppleTalk NBP name of the device. This is an empty string for anything that is not a device. |
|
${httplocaladdress} |
Outputs the IP address of the web server side of the connection. If the Intermapper server is multi-homed, this is the local side IP address of the current TCP connection. Use caution with this address; URLs produced using this address might break in NAT situations. |
${httpremoteaddress} |
|
${httpuserid} |
The name used for authentication. |
Outputs ADMIN if the user has admin privileges. Otherwise, it outputs NONADMIN. |
|
Set to .png if the web client can display .png images or .jpeg images, or other supported image types. |
|
The IP address of this Intermapper server. |
|
The current map name. |
|
Displays the value set by the #title directive. |
|
Set the width of the name field. Intermapper pads the name up to xx characters wide. Use -1 to set the width of the field to the width of its contents. The default width is 20 characters. |
|
Shows Intermapper's statistics: uptime, memory usage, and so on. |
|
The telnet: URL that connects to this Intermapper Telnet server. |
|
${time} |
The arithmetic Linux time in seconds, counted from 00:00:00 UTC on 1 January 1970. |
${timestamp} |
The human-readable textual representation of the time. |
${version} |
The version of this copy of Intermapper. |
The http: URL that connects to this Intermapper server. |
Macros to Place Images On a Page
The web pages combine *map with the *mapbg and *imagemap to create a <div> that superimposes all three items into a single visual unit. See Intermapper Settings/Web Pages/PerMapHTML/map.html for an example.
Macros That Control the Interval Between Page Refreshes
Intermapper's web server can automatically refresh a web page at a desired interval. Include these tags on your page to take advantage of this facility.
Macros Related to Links and URLs
These macros all return a fully-escaped string, meaning that a space character is replaced with a %20, a question mark (?) with %3F, and so on.
The following is a sample URL. The result of using this URL is shown in parentheses after each macro:
http://localhost/Map1/device/192.168.0.1%3ASNMP/!device.html