Template:Link
From PCSAR
| Line 1: | Line 1: | ||
| - | <noinclude> | + | <noinclude>{{documentation}}</noinclude><includeonly><!-- |
| - | + | ||
| - | </noinclude><includeonly>[[:{{{1}}}|{{default|{{ | + | create a link. |
| - | | ? | + | |
| - | | link=none | + | -->[[<!-- |
| - | }} | + | |
| + | if it's an Image: link, don't use the image, create a link to it. | ||
| + | |||
| + | -->:<!-- | ||
| + | |||
| + | what to link to | ||
| + | |||
| + | -->{{{1}}}<!-- | ||
| + | |||
| + | Text to display | ||
| + | |||
| + | -->|<!-- | ||
| + | |||
| + | First choice of: | ||
| + | |||
| + | -->{{default<!-- | ||
| + | |||
| + | Arg 2, if preset | ||
| + | |||
| + | -->|{{{2|}}}<!-- | ||
| + | |||
| + | The text of the page's "Page description" attribute | ||
| + | |||
| + | -->|{{#ask: [[{{{1}}}]] | ||
| + | | ?Page description = | ||
| + | | link=none | ||
| + | }}<!-- | ||
| + | |||
| + | last choice: the page name itself | ||
| + | |||
| + | -->|{{{1}}}<!-- | ||
| + | -->}}<!-- | ||
| + | |||
| + | end of link | ||
| + | |||
| + | -->]]<!-- | ||
| + | |||
| + | --></includeonly> | ||
Revision as of 02:50, 7 February 2012
This is the documentation for the template Template:Link
This template creates a link to another wiki page.
Common usageMost commonly this template is called as
FeaturesThis template is similar to creating a link with double square brackets:
Double square brackets requires extra decoration with a leading colon when the page
is an If no Text is provided, the link is shown as the Page name.
For subpages (e.g. 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. ParametersThe template
ExamplesFor 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
ImplementationHelper templates: Icons: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To see how this template is implemented,
edit this page and examine the portion
between <includeonly> and </includeonly>.

