Template:Link
This template provides a shortcut for linking.
Usage
{{subst:Link|1=|2=|colon=}}
Parameters
Parameter name | Description | Default value | required or optional? |
---|---|---|---|
parameter #1 (1) | targetpage (without prefix, mandatory) | empty | required |
parameter #2 (2) | message to display | same as parameter #1, with an excepiton (see below) | optional |
colon | optional. When set to yes, forces the link to have a colon (:) at the front | no | optional |
Example
On Wp/en/Main page (if English Wikipedia is a test wiki):
Code | Output | Description |
---|---|---|
{{subst:Link|Example}}
|
[[Wp/en/Example|Example]]
|
Link to page Example in the test wiki |
{{subst:Link|Example|Hello?}}
|
[[Wp/en/Example|Hello?]]
|
Custom display message |
{{subst:Link|Category:Example}}
|
[[Category:Wp/en/Example|Main page]]
|
Add the page to target category, with correct sorting |
{{subst:Link|Category:Example|colon = yes}}
|
[[:Category:Wp/en/Example|Category:Example]]
|
Link to target category (instead of include) |
{{subst:Link|Project:Example}}
|
[[Wp/en/Project:Example|Project:Example]]
|
Project namespace should not be linked to Incubator:Wp/en/Example, which describes the Incubator, not the test wiki |
Additional information
The template is intended to be used in the following namespaces: all namespaces (but must have a prefix)
The template is intended to be used by the following user groups: all users