To create a link to another page, simply enclose the name of the page inside double brackets, as in
[[wiki sandbox]] or
[[installation]]. These result in links to wiki sandbox and installation, respectively.
PmWiki ignores all spaces between words when creating a link from the text inside the double brackets, and will automatically capitalize words following spaces and other punctuation (like ~). Thus
[[wiki sandbox]], and
[[WikiSandbox]] all display differently but link to the same page titled WikiSandbox.
In other words, when a page is created PmWiki will automatically name the page using title case, but links to the page will display as written.
A suffix can also be added to the end of a link, which becomes part of the link text but not the target. Thus
[[wiki sandbox]]es is a link to WikiSandbox but displays as wiki sandboxes. And you can put parentheses around any text you don't want to have displayed, so that
[[(wiki) sandbox]] links to WikiSandbox and displays as sandbox.
Finally, you can specify the link text via a vertical brace, thus
[[WikiSandbox | a play area]], which links to WikiSandbox but displays as a play area. You can use an arrow (
->) to reverse the order of the text and target, as in
[[a play area -> WikiSandbox]] (a play area).
To define a location within a page to which you may jump directly, use the markup
[[#name]]. This creates an »anchor« that uniquely identifies that location in the page. Then to have a link jump directly to that anchor, use one of
[[#name|link text]]within the same page, or
[[PageName#name|link text]]for a location on another page
[[PageName(#name)]] may be useful for hiding the anchor text in a link.
Links to external sites simply begin with a prefix such as 'http:', 'ftp:', etc. Thus
[[http://www.google.com/]] both link to Google. As with the above, an author can specify the link text by using the vertical brace or arrow syntax, as in
[[http://www.google.com/ | Google]] and
[[Google -> http://www.google.com]].
InterMap links are also supported (see InterMap). In particular, the
Path: InterMap entry can be used to create links using relative or absolute paths on the current site (e.g.,
To have a link open in another window, use
%newwin% http://www.pmichaud.comproduces http://www.pmichaud.com
%newwin% Main.WikiSandboxproduces Main.WikiSandbox
You can also specify that links should open in a new window via the
%target=_blank% Any links on this line like http://www.pmichaud.com will open in a new window.
Any links on this line like http://www.pmichaud.com will open in a new window.