Template:Wlink/doc: Difference between revisions
Jump to navigation
Jump to search
ArrowHead294 (talk | contribs) mNo edit summary |
m Readability for editors |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{dochead}} | {{dochead}}{{substitute|no}} | ||
Normally, if you want to link to a Wikipedia article such as {{w|just intonation}}, you have to write the entire title twice (<code> | Normally, if you want to link to a Wikipedia article such as {{w|just intonation}}, you have to write the entire title twice (<code><nowiki>[[Wikipedia: Just intonation|Just intonation]]</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. | ||
{{Shortcut|w}} | {{Shortcut|w}} | ||
Line 6: | Line 6: | ||
=== Parameters === | === Parameters === | ||
This parameter takes one or two unnamed parameters. | This parameter takes one or two unnamed parameters. | ||
; <code>{{{ | ; <code><nowiki>{{{1}}}</nowiki></code> (required) | ||
: Full name of the article on Wikipedia. | : Full name of the article on Wikipedia. If omitted the template will simply link to the English Wikipedia's cover page. | ||
; <code>{{{ | ; <code><nowiki>{{{2}}}</nowiki></code> (optional) | ||
: | : Text to be displayed. | ||
; <code>{{{ | ; <code><nowiki>{{{s}}}</nowiki></code> (optional) | ||
: A named parameter used to specify namespaces on Wikipedia such as <code>wp</code> (Wikipedia project pages), <code>help</code> (help pages), | : A named parameter used to specify namespaces on Wikipedia such as <code>wp</code> (Wikipedia project pages), <code>help</code> (help pages), and <code>module</code> (Lua modules). | ||
: | : Other Wikimedia Foundation projects can also be linked, such as <code>wikt</code> (Wiktionary) or <code>meta</code> (Wikimedia's meta-wiki). | ||
: | : Non-English languages can also be linked using {{w|ISO 639-1}} abbreviations, such as <code>fr</code> for French and <code>es</code> for Spanish. | ||
: These can be combined; for example, <code><nowiki>{{wlink|Vandalisme|s=fr:wp}}</nowiki></code> is equivalent to <code><nowiki>[[wikipedia:fr:wp:Vandalisme|Vandalisme]]</nowiki></code> and will link to the {{wlink|Vandalisme|French Wikipedia's policy page on vandalism|s=fr:wp}}. | |||
=== See also === | === See also === | ||
* [[Template:Wikipedia]] – another template used to display a small navigation box linking to the English Wikipedia | * [[Template: Wikipedia]] – another template used to display a small navigation box linking to the English Wikipedia |
Latest revision as of 13:39, 6 June 2025
![]() |
This template should not be substituted. |
Normally, if you want to link to a Wikipedia article such as just intonation, you have to write the entire title twice ([[Wikipedia: Just intonation|Just intonation]]
), 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.
Note: You can use {{w}}
as a shortcut.
Parameters
This parameter takes one or two unnamed parameters.
{{{1}}}
(required)- Full name of the article on Wikipedia. If omitted the template will simply link to the English Wikipedia's cover page.
{{{2}}}
(optional)- Text to be displayed.
{{{s}}}
(optional)- A named parameter used to specify namespaces on Wikipedia such as
wp
(Wikipedia project pages),help
(help pages), andmodule
(Lua modules). - Other Wikimedia Foundation projects can also be linked, such as
wikt
(Wiktionary) ormeta
(Wikimedia's meta-wiki). - Non-English languages can also be linked using ISO 639-1 abbreviations, such as
fr
for French andes
for Spanish. - These can be combined; for example,
{{wlink|Vandalisme|s=fr:wp}}
is equivalent to[[wikipedia:fr:wp:Vandalisme|Vandalisme]]
and will link to the French Wikipedia's policy page on vandalism.
See also
- Template: Wikipedia – another template used to display a small navigation box linking to the English Wikipedia