This template creates a link to another wiki page.
Common usage
Most commonly this template is called as
{{link|Page}} .
In the form
{{link|Page|Text}}
it creates a link to Page but displays the link as Text.
It is also commonly used to provide links to file descriptor pages.
See Help:Linking to files.
{{link}}
is an alternative shortened name for
{{Link/Desc}} .
Either can be used.
Features
This template is similar to creating a link with double square brackets:
[[Page]] .
Double square brackets requires extra decoration with a leading colon when the page
is an Image: , File: or Category: .
This template handles those types of pages without any extra work; no leading colon is necessary.
If no Text is provided, the link is shown as the Page name.
For subpages (e.g. Main Topic/subtopic )
the link text is just the subtopic.
The page can have a description and that description will be displayed as the text of the link.
The description is taken from the Property:Page description
which can be set using Template:desc, etc.
The link can lead to a previous version of a wiki page, using the parameter RevisionID.
For multipage PDF's the link can lead to a specific page, using the parameter PageNum.
As Template:Link/Create or Template:Link/Create+Desc, links to pages that don't exist yet can specify default text for their creation.
Parameters
The template {{Link|Page|RevisionID=id|PageNum=number|Text|Desc=description}}
uses the following parameters:
- Page
- the page to link to
- RevisionID
- (optional) The revision to link to. This is used to link to an old version of an existing page. Revision ID's can be found on the "history" tab of the page in question, as "oldid". Revision ID's are unique across all pages, so the Revision ID also specifies the Page. If the Revision ID is provided, the Page does not need to be specified unless it is to provide the link text.
- PageNum
- (optional) if Page is a file that supports multiple internal pages, this parameter will link to the specified internal page
- Text
- (optional) the text to display as the link
- Desc
- (optional) the text to display as the link if the page does not have a description and Text is not supplied. There is no point to specifying both Text and Desc.
Examples
For illustration purpose, the following demonstration pages have been set up:
Here's how it would work if you had used square brackets instead.
(The difference between this table and the previous one is only in the first case.)
Using Desc :
You type...
| You get...
|
{{Link/Desc|Demo/Page with description|Desc=this page}}
| Described page
|
{{Link/Desc|Demo/Page without description|Desc=this page}}
| this page
|
{{Link/Desc|Demo/Page with description|That Page|Desc=this page}}
| That Page
|
{{Link/Desc|Demo/Page without description|That Page|Desc=this page}}
| That Page
|
Using RevisionID :
You type...
| You get...
|
{{Link/Desc|RevisionID=1}}
| link
|
{{Link/Desc|Main Page|RevisionID=1}}
| Main Page
|
{{Link/Desc|Main Page|main|RevisionID=1}}
| main
|
Using PageNum :
You type...
| You get...
|
{{Link/Desc|Main Page|PageNum=2}}
| Main Page
|
Implementation
Helper templates:
Icons:
|