1==== InterWiki Links ====
2
3The original idea of InterWiki was to have one large distributed Wiki over the whole Internet. Today its more of an easy way to link from one wiki to another by having some simple link syntax to accomplish so.
4
5In DokuWiki this is done by prefixing Wiki pagenames with a shortcut separated by a ''>'' character (eg. ''<nowiki>[[wp>InterWiki]]</nowiki>'').
6
7Examples:
8
9| %%[[wp>InterWiki]]%%    | [[wp>InterWiki]]    | links to the English language Wikipedia |
10| %%[[phpfn>random]]%%    | [[phpfn>random]]    | links to a function in the PHP manual |
11| %%[[google>Wiki]]%%     | [[google>Wiki]]     | links to a Google search |
12| %%[[doku>interwiki]]%%  | [[doku>interwiki]]  | links to the DokuWiki wiki |
13| %%[[skype>echo123]]%%   | [[skype>echo123]]   | Links that opens Skype, ready to call Skype Test Call (echo123) |
14| %%[[this>feed.php]]%%   | [[this>feed.php]]   | links to your wiki's URL. The example links to the local [[doku>syndication|XML feed]]. ''%%[[this>]]%%'' is a special case and the only interwiki link which **cannot be configured** through any config file. |
15
16The format of the interwiki config file is:
17
18  <shortcut>      <url to wiki>
19
20The shortcut is the one you will be able to use in the link later. In the URL you can use some placeholders to be more flexible in linking. If no placeholder is given the [[phpfn>rawurlencode|URL-encoded]] wikiname will be appended to the URL. These placeholders are available:
21
22^ Placeholder  ^  Replaced by                                                                          ^
23| {URL}        | URL-encoded wikiname (the part which is appended to the URL in interwiki.local.conf)  |
24| {NAME}       | wikiname without any encoding                                                         |
25| {SCHEME}     | scheme part if an URL was given as wikiname                                           |
26| {HOST}       | host part if an URL was given as wikiname                                             |
27| {PORT}       | port part if an URL was given as wikiname                                             |
28| {PATH}       | path part if an URL was given as wikiname                                             |
29| {QUERY}      | query part if an URL was given as wikiname                                            |
30
31If no placeholder is defined the urlencoded name is appended to the URL.
32
33=== Example of interwiki.conf ===
34
35<code>
36wp        https://en.wikipedia.org/wiki/{NAME}
37doku      https://www.dokuwiki.org/
38user      :user:{NAME}
39</code>
40
41=== See also ===
42  * [[doku>interwiki]]
43