Template:Link/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with " ==Examples== {{MdCode|<nowiki>{{Plain link|https://Wikipedia.com/wiki/Main_Page}}</nowiki>}} {{Documentation/PreviewBlock|{{Plain link|https://Wikipedia.com/wiki/Main_Page}}}...")
 
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Doc/subpage}}
Creates an external link.


==Examples==
== Usage ==
{{MdCode|<nowiki>{{Plain link|https://Wikipedia.com/wiki/Main_Page}}</nowiki>}}
{{Template usage example|inline_nospaces}}
{{Documentation/PreviewBlock|{{Plain link|https://Wikipedia.com/wiki/Main_Page}}}}


{{MdCode|<nowiki>{{Plain link|https://Wikipedia.com/wiki/Main_Page|Wikipedia Main Page}}</nowiki>}}
== Parameters and Examples ==
{{Documentation/PreviewBlock|{{Plain link|https://Wikipedia.com/wiki/Main_Page|Wikipedia Main Page}}}}
{| class="standard-table" style="width:100%"
! Parameter
! Description
! Example
! Preview
|-
| rowspan="2" style="vertical-align:top; text-align:center" | <code>{{param|1}}</code>
| rowspan="2" 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">{{link|wiki.teamfortress.com}}</pre>
| style="background-color:#262626; padding:1em" | {{link|wiki.teamfortress.com}}
|-
| style="background-color:#1f1f1f" | <pre style="margin:0">{{link|plain|wiki.teamfortress.com}}</pre>
| style="background-color:#262626; padding:1em" | {{link|plain|wiki.teamfortress.com}}
|-
| style="vertical-align:top; text-align:center" | <code>{{param|2}}</code>
| 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; vertical-align:top" | <pre style="margin:0">{{link|wiki.teamfortress.com|Wikipedia Main Page}}</pre>
| style="background-color:#262626; vertical-align:top; padding:1em" | {{link|wiki.teamfortress.com|Team Fortress Wiki}}
|-
| style="vertical-align:top; text-align:center" | <code>{{param|color}}</code>
| style="vertical-align:top" | Color of displayed text.
| style="background-color:#1f1f1f" | <pre style="margin:0">{{link|wiki.teamfortress.com|Team Fortress Wiki|color=rgb(240 180 100)}}</pre>
| style="background-color:#262626; padding:1em" | {{link|wiki.teamfortress.com|Team Fortress Wiki|color=rgb(240 180 100)}}
|}
 
== See also ==
* {{t|codelink}} - keyboard input style link.
 
{{Doc/Sandbox other|
[[Category:Templates]]
[[Category:Formatting templates]]
}}__NOTOC__

Latest revision as of 10:35, 10 October 2025

Edit-copy.png
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.

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}}.

Icon-Important.pngImportant: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.

Parameters and Examples

Parameter Description Example Preview
{{{1}}} Link type or link without https://.
Available link types:
  • plain - removes the external link icon.
Note.pngNote:If the link type is specified, the order changes and the link is specified in the {{{2}}} parameter.
{{link|wiki.teamfortress.com}}
wiki.teamfortress.com
{{link|plain|wiki.teamfortress.com}}
wiki.teamfortress.com
{{{2}}} Text displayed instead of a link.
Note.pngNote:If the link type is specified, the order changes and the displayed text is specified in the {{{3}}} parameter.
{{link|wiki.teamfortress.com|Wikipedia Main Page}}
Team Fortress Wiki
{{{color}}} Color of displayed text.
{{link|wiki.teamfortress.com|Team Fortress Wiki|color=rgb(240 180 100)}}
Team Fortress Wiki

See also

  • {{codelink}} - keyboard input style link.