authors (basic)

A key feature of wiki-based systems is the ease of creating hyper links (or short links) in the text of a document. PmWiki provides multiple mechanisms for creating such links.

Links to other pages in the wiki

To create a link to another page, simply enclose the name of the page inside double square brackets, as in [[wiki sandbox]] or [[installation]]. This results in links to wiki sandbox and installation, respectively.

PmWiki creates a link by using the text inside the double brackets. It does this by removing spaces between words, and automatically capitalizing the first letter of each word following spaces or other punctuation (like ~). Thus [[Wiki Sandbox]], [[wiki sandbox]], and [[WikiSandbox]] all display differently but create the same link to the page titled WikiSandbox. Or in other words, PmWiki will automatically create the “link path name” using the page name in Camel Case?, but the “link text” will display in the format you have entered it.

Some PmWiki sites (default not) will recognize words written in Camel Case?, a WikiWord, automatically as a link to a page of the same name.

With different link text

There are three ways to get a different link text:

  1. Hide link text. Link text in (parentheses) will not be not displayed, so that [[(wiki) sandbox]] links to WikiSandbox but displays as sandbox. For links including parentheses, use %28 and %29
  2. Change link text. You can specify another link text after a vertical brace, as in [[WikiSandbox | a play area]], or you can use an arrow (->) to reverse the order of the link text and the target, as in [[a play area -> WikiSandbox]]. Both links displays as a play area.
  3. Show page title instead of page name. The use of special characters in the page name is not a problem for PmWiki, but sometimes the character set is different between the server computer (that runs PmWiki) and the client computer that is used to read your wiki. Especially the UTF-8 character set gives sometimes problems. So it’s better to use only ASCII characters in the page name, and to have the localized name in a (:title PageTitleName:) directive within the page. Now the page title can be shown instead of the page name, with the [[PageName|+]] markup, e.g. page BasicEditing contains the directive (:title Basic PmWiki editing rules:) with the result that a link written as [[BasicEditing|+]] will display as Basic PmWiki editing rules.
    Since PmWiki version 2.2.14 this works also for those technical pages that have an entry in the XL Page?, without the need to add the (:title PageTitleName:) directive within that page (for more details see Localization.Localization).

On top of above ways, a suffix can be added to the end of a link, which becomes part of the link text but not of the target page name.
Note: This feature does currently not work with the [[PageName|+]] markup.

What to type

What it looks like

[[(wiki) sandbox]],
[[(wiki) sandbox]]es\\
[[WikiSandbox|wiki sandbox]],
[[WikiSandbox|wiki sandbox]]es\\

sandbox, sandboxes
wiki sandbox, wiki sandboxes
Basic PmWiki editing rules

Links to nonexistent pages

Links to nonexistent pages? are displayed specially, to invite others to create the page. See Creating new pages to learn more.

Links to pages in other wiki groups

Links as written above are links between pages of the same group. To create a link to a page in another group, add the name of that other group and a dot or slash as prefix to the page name. For example, links to Main/WikiSandbox could be written as:

What to type

What it looks like

* [[Main.WikiSandbox]]
* [[Main/WikiSandbox]]
* [[(Main.Wiki)Sandbox]]
* [[Main.WikiSandbox | link text]]
* [[Main.WikiSandbox | +]]

To link to the “default home page” of a group, the name of the page can be omitted:

* [[Main.]]
* [[Main/]]

See Wiki Group to learn more about PmWiki groups.

Link shortcuts

[[PageName|#]] creates a reference link as shown belowLinks as References.

[[!PageName]] creates a link to the Page Name? in the group called Category. See Categories.

[[~Author]] link creates a link to the page called Author in the Profiles group.

~~~ markup creates a link for the current Author when it encounters three tilde characters (~) in a row (~~~).

~~~~ markup creates a link for the current author and appends the current date and time when four tilde characters (~) in a row are encountered

Links to specific locations within a page — “anchors”

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]] or [[PageName#name|link text]] for a location on another page
  • The form [[PageName(#name)]] may be useful for hiding the anchor text in a link.

For example, here’s a link to the Intermaps section, below.


  • the anchor itself must begin with a letter, not a number
  • a link to an anchor must have the same capitalization as the anchor itself.
  • Spaces are not allowed in an anchor: “[[#my anchor]]” won’t work, “[[#myanchor]]” will.

Links to actions

To link to a specific action for the current page use [[{$FullName}?action=actionname|linkname]].


  • [[{$FullName}?action=edit|Edit]] for the editing or
  • [[{$FullName}?action=diff|differences]] for differences.

Links outside the wiki

Links to external sites (URLs)

Links to external sites simply begin with a prefix such as ‘http:’, ‘ftp:’, etc. Thus and [[]] 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 [[ | Google]] and [[Google ->]].

It is possible to set a “tooltip title” of the external link by adding it in quotes after the address:

The tooltip title of the link is "Home of PmWiki"
[["Home of


If the external link includes (parentheses), escape these using %28 for “(“ and %29 for “)” :

[[ | link to "Wiki
(disambiguation)" ]]

link to “Wiki (disambiguation)”

Links to intranet (local) files

You can link to a file system by including the prefix 'file:///' (for Internet Explorer at least). So file:///S:\ProjPlan.mpp and [[Shared S drive->file:///S:\]] are both valid links. On a Windows file system you may want to use network locations (eg \\server1\rootdirectory\subdirectory) rather than drive letters which may not be consistent across all users. Not all browsers will follow such links.

Link characteristics

Links as References

Links may also be specified as References, so the target appears as an anonymous numeric reference rather than a textual reference. The following markup is provided to produce sequential reference numbering within a PmWiki page:

Formatting the link as: [[ |#]] produces: [1] as the link.

Subsequent occurrence of the reference link format on the same page will be incremented automatically as per the following example: Entering [[ |#]] produces [2], [[#intermaps |#]] produces Intermaps, and so on for further reference links.


Inter Map links are also supported (see Inter Map). In particular, the Path: Inter Map entry can be used to create links using relative or absolute paths on the current site (e.g., Path:../../somedir/foo.html or Path:/dir/something.gif).

Links that open a new browser window

To have a link open in another window, use %newwin%...%%:

You can also specify that links should open in a new window via the %target=_blank%...%% attribute:

The following link %target=_blank% %%
will open in a new window.

The following link will open in a new window.

Links that are not followed by robots

Prefix a link with %rel=nofollow% to advise robots and link checkers not to follow it.

Links and CSS Classes

PmWiki automatically gives classes to several types of links. Among other things, this enables you to format each type differently.

Note: This may be an incomplete list.

A link to the current page. Useful in sidebars to show “you are here”.
A link to another page within the wiki.
A link to a page outside the wiki.


Note: The default behavior of “+” above can be overridden to display the spaced title, rather than simply the title by adding the following to config.php:

## [[target |+]] title links
Markup('[[|+', '<[[|',
  "Keep(MakeLink(\$pagename, PSS('$1'),
                 PageVar(MakePageName(\$pagename,PSS('$1')), '\$Titlespaced')

Q How do I create a link that will open as a new window?

Use the %newwin% wikistyle, as in:

%newwin% %%

Q How do I create a link that will open a new window, and configure that new window?

This requires javascript. See Cookbook:PopupWindow.

Q How do I place a mailing address in a page?

Use the mailto: markup, as in one of the following:

* [[]]
* [[ | email
subject | email me]]

The markup [[ Subject&body=Pre-set body | display text]] =] lets you specify more parameters like the message body and more recipients (may not work in all browsers and e-mail clients).

See also Cookbook:DeObMail for information on protecting email addresses from spammers.

Q How can I enable links to other protocols, such as nntp:, ssh:, xmpp:, etc?

See Cookbook:Add Url schemes

Q How do I make a Wiki Word link to an external page instead of a Wiki Page?

Use link markup. There are two formats:

[[ | WikiWord]]
[[WikiWord ->]]

Q How do I find all of the pages that link to another page (i.e., backlinks)?

In the wiki search form, use link=Group.Page to find all pages linking to Group.Page.

Use the link= option of the (:pagelist:) directive, as in

(:pagelist link=SomePage list=all:)   -- show all links to SomePage
(:pagelist link={$FullName} list=all:)  -- show all links to the current page

Q What link schemes does PmWiki support?

See PmWiki:Link schemes

Q How do I open external links in a new window or mark them with an icon?

See Cookbook:External links

Q How can I use an image as a link?

Use [[Page| Attach:image.jpg ]] or [[ http://site | http://site/image.jpg ]] See Images#links

This page may have a more recent version on PmWiki:Links, and a talk page: PmWiki:Links-Talk.


edit SideBar

Page last modified on 05 September 2010 at 05:12 AM