Introduction

This page describes how a wiki administrator can create additional InterMap links.

The file intermap.txt in the scripts/ directory specifies the default InterMap links that are distributed with PmWiki. Each line of intermap.txt has the following format:

MapPrefix:      http://www.somehost.com/partial/url/

For example, intermap.txt has the following entries:

PmWiki:         http://www.pmwiki.org/wiki/PmWiki/
Cookbook:       http://www.pmwiki.org/wiki/Cookbook/
Wiki:           http://www.c2.com/cgi/wiki?
UseMod:         http://www.usemod.com/cgi-bin/wiki.pl?
Meatball:       http://www.usemod.com/cgi-bin/mb.pl?
Wikipedia:      http://www.wikipedia.com/wiki/
PITS:           http://www.pmwiki.org/PITS/
Path:

To create your own InterMap links, do not edit the intermap.txt file directly! You'll lose your changes when you do a upgrade. Instead, you can either create a page called Site.InterMap containing entries like the above, or you can create a file called localmap.txt in the local/ subdirectory containing your InterMap links. PmWiki will automatically read your links after loading the intermap.txt entries.

You can also define InterMap entries where the text of the entry is substituted into the middle of the URL. Just include '$1' in the URL where you want the substitution to take place. For example:

Jargon: http://www.catb.org/~esr/jargon/html/$1.html

would cause Jargon:F/feature-creep to be converted to http://www.catb.org/~esr/jargon/html/F/feature-creep.html.

Variables and InterMap Links

It is possible to use variables together with the URLs in the InterMap entries. For instance, you can add something like this to your local/localmap.txt file, creating ThisWiki: and ThisPage: shortcuts:

ThisWiki:        $ScriptUrl
ThisPage:        $PageUrl

InterMap Links in a Farm

Farm-wide InterMap links can be created using local/farmmap.txt.

<< Wiki Farms | DocumentationIndex | Custom markup >>