Inter-Wiki Link Rules (or Links to other Sites)
This topic lists all aliases needed to map inter-wiki links to external wikis/sites.
Whenever you write
ExternalSite:Page
it will be linked automatically to the page on the external site. The link points to the URL corresponding to the
ExternalSite
alias below, concatenated to the
Page
you choose. Example: Type
Wiki:RecentChanges
to get
Wiki:RecentChanges, the RecentChanges page at the original Wiki site.
Note: This topic needs to be visible for all users, or the plugin will not work correctly.
How to define Inter-Wiki Links
Inter-wiki links are defined in the tables below.
- Each entry must be three or four columns, using the following format:
| External site alias | URL | Tooltip help text | Optional INTERLINKFORMAT override |
.
- The Alias must start with an upper case letter and may contain alphanumeric characters.
- The URL and Tooltip Text may contain optional
$page
formatting tokens; the token gets expanded to the page name.
- The URL may contain Foswiki macros. They are expanded when the URL is rendered.
- The Tooltip Text must not contain:
- any HTML tags (including
<nop>
escape code)
- any internal WikiWord links
- any external links
- Hint: Escape
'WikiWords'
and '$page'
.
- If the link format override is provided, it overrides the
INTERWIKIPLUGIN_INTERLINKFORMAT
for just that entry.
Note that Interwiki links do not properly resolve when part of an INCLUDEd page name. e.g.
%INCLUDE{"Interwiki:link"}%
For links with parentheses you will need to write as
[[Wikipedia:Fork_(software_development)]]
, or quoted, as
Wikipedia:'Fork_(software_development)'
as the plugin will not include the closing parenthesis as part of the link.
The optional INTERLINKFORMAT override can incorporate the following tokens
which are expanded when the link is generated:
Token |
Meaning |
$site |
Site alias |
$page |
Page (part after colon) |
$url |
Site URL (might contain $page) |
$label |
Equal to $site:$page |
$tooltip |
Tooltip message |
See
InterwikiPlugin for more details on specifiying the INTERLINKFORMAT.
Adding your own Inter-Wiki Links
Rather than adding your own inter-wiki links to this topic, the recommended approach is to create a topic in your Main Web, for example
Main.InterWikis. You can then set the
INTERWIKIPLUGIN_RULESTOPIC
preference setting in
Main.SitePreferences as follows:
* Set INTERWIKIPLUGIN_RULESTOPIC = %SYSTEMWEB%.InterWikis, %USERSWEB%.InterWikis
Any inter-wikis you add to
Main.InterWikis will then be available in the same way that the inter-wikis from here are. If you create a rule in
Main.InterWikis which has the same alias as a rule in this topic, the rule from
Main.InterWikis will take preference.
General Inter-Site Links
Inter-Wiki Links
Note: This topic configures the
InterwikiPlugin.
Related Topics: Plugins,
UserDocumentationCategory,
AdminDocumentationCategory