Template:Wiki/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created doc page.)
 
(Linked pipe trick. Put examples together.)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page.) -->
<!-- Please place categories where indicated at the bottom of this page. -->
This template is a faster way to link to Wikipedia articles. Normally if you want to link to a Wikipedia article such as [[Wikipedia:IMI Desert Eagle|IMI Desert Eagle]], you have to write the entire title twice (<nowiki>[[Wikipedia:IMI Desert Eagle|IMI Desert Eagle]]</nowiki> and it's a hassle. This template skips that step when the displayed text will be the same as the title of the article you are linking to.
== Usage ==
==Usage==
{{tip|The [[w:help:pipe trick|pipe trick]] makes this template redundant. See also: [[Help:Linking]].}}
{{syntax|<nowiki>{{wiki|<ARTICLE>}}</nowiki>}}
This template is a faster way to link to Wikipedia articles. Normally if you want to link to a Wikipedia article such as [[Wikipedia:IMI Desert Eagle|IMI Desert Eagle]], you have to write the entire title twice <code><nowiki>[[Wikipedia:IMI Desert Eagle|IMI Desert Eagle]]</nowiki></code> and it's a hassle. This template skips that step when the displayed text will be the same as the title of the article you are linking to.
Example: <code><nowiki>{{wiki|IMI Desert Eagle}}</nowiki></code>.


To link to another language page of Wikipedia, use: <code><nowiki>{{Wiki|<lang-prefix>:ARTICLE}}</nowiki></code>, see the example below.
{{note|{{tl2|wikipedia}} redirects to {{tl2|wiki}}, so they're equivalent.}}


You can also use the expanded version of this template: <code><nowiki>{{Wikipedia|ARTICLE}}</nowiki></code>.
=== Parameters ===
* {{param|1}} - The wikipedia article name to link to.
* {{param|2}} - Optional: The display text for the link.


For link on another lang of Wikipedia use: <code><nowiki>{{Wiki|<lang-prefix>:ARTICLE}}</nowiki></code>. Example: <code><nowiki>{{Wiki|ru:Гейб Ньювелл|Гейб Ньювелл}}</nowiki></code> - {{Wiki|ru:Гейб Ньювелл|Гейб Ньювелл}}
=== Examples ===
{| style=background:none
| {{tlc|wiki|IMI Desert Eagle}} || &rarr; || {{wiki|IMI Desert Eagle}}
|-
| {{tlc|wiki|IMI Desert Eagle|Deagle}} || &rarr; || {{wiki|IMI Desert Eagle|Deagle}}
|-
| {{tlc|wiki|ru:Гейб Ньювелл|Гейб Ньювелл}} || &rarr; || {{wiki|ru:Гейб Ньювелл|Гейб Ньювелл}}
|}


<includeonly>{{sandbox other||
<includeonly>{{sandbox other||

Revision as of 20:12, 26 April 2022

Edit-copy.png
This is a documentation subpage for Template:Wiki.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Usage

Tip.pngTip:The pipe trick makes this template redundant. See also: Help:Linking.

This template is a faster way to link to Wikipedia articles. Normally if you want to link to a Wikipedia article such as IMI Desert Eagle, you have to write the entire title twice [[Wikipedia:IMI Desert Eagle|IMI Desert Eagle]] and it's a hassle. This template skips that step when the displayed text will be the same as the title of the article you are linking to.

To link to another language page of Wikipedia, use: {{Wiki|<lang-prefix>:ARTICLE}}, see the example below.

Note.pngNote:{{wikipedia}} redirects to {{wiki}}, so they're equivalent.

Parameters

  • {{{1}}} - The wikipedia article name to link to.
  • {{{2}}} - Optional: The display text for the link.

Examples

{{wiki|IMI Desert Eagle}} Wikipedia icon IMI Desert Eagle
{{wiki|IMI Desert Eagle|Deagle}} Wikipedia icon Deagle
{{wiki|ru:Гейб Ньювелл|Гейб Ньювелл}} Wikipedia icon Гейб Ньювелл