Template:Wiki/doc: Difference between revisions
Jump to navigation
Jump to search
Tip:The pipe trick makes this template redundant. See also: Help:Linking.
Kestrelguy (talk | contribs) m (moved from the "Templates" category (which isn't supposed to contain templates themselves, only categories) to the "Formatting templates" category.) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<!-- Please place categories where indicated at the bottom of this page. --> | <!-- Please place categories where indicated at the bottom of this page. --> | ||
== Usage == | == Usage == | ||
{{ | {{Tip|The [[w:help:pipe trick|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 [[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. | 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. | ||
To link to another language page of Wikipedia, use: <code><nowiki>{{Wiki|<lang-prefix>:ARTICLE}}</nowiki></code>, see the example below. | 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.}} | ||
=== Parameters === | === Parameters === | ||
* {{ | * {{Param}} – The wikipedia article name to link to. | ||
* {{ | * {{Param|2}} – Optional: The display text for the link. | ||
=== Examples === | === Examples === | ||
{| style=background:none | {| style=background:none | ||
| {{tlc| | | {{tlc|Wiki|IMI Desert Eagle}} || → || {{Wiki|IMI Desert Eagle}} | ||
|- | |- | ||
| {{tlc| | | {{tlc|Wiki|IMI Desert Eagle|Deagle}} || → || {{Wiki|IMI Desert Eagle|Deagle}} | ||
|- | |- | ||
| {{tlc| | | {{tlc|Wiki|ru:Гейб Ньювелл|Гейб Ньювелл}} || → || {{Wiki|ru:Гейб Ньювелл|Гейб Ньювелл}} | ||
|} | |} | ||
<includeonly>{{ | <includeonly>{{Sandbox other|| | ||
<!-- Categories below this line, please --> | <!-- Categories below this line, please --> | ||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
}}</includeonly> | }}</includeonly> |
Revision as of 11:33, 29 April 2023

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.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Usage

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.
Parameters
- {{{1}}} – The wikipedia article name to link to.
- {{{2}}} – Optional: The display text for the link.
Examples
{{Wiki|IMI Desert Eagle}} |
→ | ![]() |
{{Wiki|IMI Desert Eagle|Deagle}} |
→ | ![]() |
{{Wiki|ru:Гейб Ньювелл|Гейб Ньювелл}} |
→ | ![]() |