Help:Link

From Free Talk Live

Jump to: navigation, search

The MediaWiki link syntax is simple, powerful, and a little confusing for advanced features. The basics are easy to pick up, however. First of all you link to things by putting two brackets around a word or group of words. For example:

[[Main Page]]

will link to the Main Page, like that.

You can also place a namespace in the link by specifying the namespace, a colon, and the page name. This looks like

[[Free Talk Live:Community Portal]]

and generates a link that looks like this: Free Talk Live:Community Portal. MediaWiki will let you specify an alternate name that will be displayed for the link using the pipe (the | symbol, accessed via shift+back slash). By placing a pipe after the destination of the link and adding in text, the alternate text will be displayed instead. For instance:

[[Free Talk Live:Community Portal|Community Portal]]

Generates a link like this: Community Portal

The pipe can also automatically remove the namespace from the link; this is known as the pipe trick.By leaving the last character of the link as a pipe, MediaWiki will do some of the work for us. For example:

[[Free Talk Live:Community Portal|]]

Generates a link like this: Community Portal. The astute who are looking at this as an example will notice that the link is in the page with the full pipe syntax. This is because MediaWiki will store the results of the pipe trick in the page when it saves it; during preview, the pipe trick will still show up.

Advanced linking

Some things are not able to be linked to normally. For instance, it is not possible to link to a category using the standard syntax because it is identical to the way an article is categorized. For instance: [[Category:Help]] would put an article into a category, but [[:Category:Help]], with a : after the last [ and before Category, links to the category.

See also

Personal tools