Template:Link/doc: Difference between revisions
Jump to navigation
Jump to search
Important:This template requires that parameters and values do not have spaces at the beginning or end. This is due to wiki engine limitations, user preferences, or other reasons.
No edit summary |
|||
Line 1: | Line 1: | ||
{{Doc/subpage}} | {{Doc/subpage}} | ||
Creates an external link. | |||
== | == Usage == | ||
{{ | {{Template usage example|inline_nospaces}} | ||
== Parameters and Examples == | |||
{| class="standard-table" style="width:100%" | |||
! Parameter | |||
! Description | |||
! Example | |||
! Preview | |||
|- | |||
| rowspan="4" style="vertical-align:top; text-align:center" | <code>{{param|1}}</code> or <code>{{param|2}}</code> | |||
| rowspan="4" style="vertical-align:top" | Link type or link without <code>https://</code>.<br>Available link types: | |||
* <code>plain</code> - removes the external link icon. | |||
{{Note|If the link type is specified, the order changes and the link is specified in the {{param|2}} parameter.}} | |||
| style="background-color:#1f1f1f" | <pre style="margin:0">| wikipedia.com/wiki/Main_Page</pre> | |||
| rowspan="2" style="background-color:#262626; vertical-align:top; padding:1em" | {{link|wikipedia.com/wiki/Main_Page}} | |||
|- | |||
| style="background-color:#1f1f1f" | <pre style="margin:0">| 1 = wikipedia.com/wiki/Main_Page</pre> | |||
|- | |||
| style="background-color:#1f1f1f" | <pre style="margin:0">| plain</pre> | |||
| rowspan="2" style="background-color:#262626; vertical-align:top; padding:1em" | {{link|plain|wikipedia.com/wiki/Main_Page}} | |||
|- | |||
| style="background-color:#1f1f1f" | <pre style="margin:0">| 1 = plain</pre> | |||
|- | |||
| rowspan="2" style="vertical-align:top; text-align:center" | <code>{{param|2}}</code> or <code>{{param|3}}</code> | |||
| rowspan="2" style="vertical-align:top" | Text displayed instead of a link.<br>{{Note|If the link type is specified, the order changes and the displayed text is specified in the {{param|3}} parameter.}} | |||
| style="background-color:#1f1f1f" | <pre style="margin:0">| wikipedia.com/wiki/Main_Page | Wikipedia Main Page</pre> | |||
| rowspan="2" style="background-color:#262626; vertical-align:top; padding:1em" | {{link|wikipedia.com/wiki/Main_Page|Wikipedia Main Page}} | |||
|- | |||
| style="background-color:#1f1f1f" | <pre style="margin:0">| 2 = Wikipedia Main Page</pre> | |||
|- | |||
| style="vertical-align:top; text-align:center" | <code>{{param|color}}</code> | |||
| style="vertical-align:top" | Text color. | |||
| style="background-color:#1f1f1f" | <pre style="margin:0">| color = rgb(240 180 100)</pre> | |||
| style="background-color:#262626; vertical-align:top; padding:1em" | {{link|wikipedia.com/wiki/Main_Page|Wikipedia Main Page|color=rgb(240 180 100)}} | |||
|} | |||
{{ | == See also == | ||
* {{t|codelink}} - keyboard input style link. | |||
{{Doc/Sandbox other| | {{Doc/Sandbox other| | ||
[[Category:Templates]] | [[Category:Templates]] | ||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
}} | }}__NOTOC__ |
Revision as of 11:09, 10 October 2025

This is a documentation subpage for Template:Link.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Creates an external link.
Usage
This template is usually written in a single line. To use it, insert {{Link}}
into the desired page and specify the parameters to the right of the template name in the following format: {{Link|parameter 1=value|parameter 2=value}}
.

Parameters and Examples
Parameter | Description | Example | Preview |
---|---|---|---|
{{{1}}} or {{{2}}}
|
Link type or link without https:// .Available link types:
![]() |
| wikipedia.com/wiki/Main_Page |
wikipedia.com/wiki/Main_Page |
| 1 = wikipedia.com/wiki/Main_Page | |||
| plain |
wikipedia.com/wiki/Main_Page | ||
| 1 = plain | |||
{{{2}}} or {{{3}}}
|
Text displayed instead of a link.![]() |
| wikipedia.com/wiki/Main_Page | Wikipedia Main Page |
Wikipedia Main Page |
| 2 = Wikipedia Main Page | |||
{{{color}}}
|
Text color. | | color = rgb(240 180 100) |
Wikipedia Main Page |
See also
- {{codelink}} - keyboard input style link.