Template:Wlink/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 13: Line 13:


; <code>{{{<nowiki />s}}}</code> (optional)
; <code>{{{<nowiki />s}}}</code> (optional)
: 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), or for non-English languages (using {{w|ISO 639-1}} abbreviations); for example, <code>fr</code> for French and <code>es</code> for Spanish.
: 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).
: The two can be combined; for example, <code>{{<nowiki />wlink|Vandalisme|s=fr:wp}}</code> links to the {{wlink|Vandalisme|French Wikipedia's policy page on vandalism|s=fr:wp}} (always put the language first, then the project namespace).
: Non-English languages can also be linked using {{w|ISO 639-1}} abbreviations; for example, <code>fr</code> for French and <code>es</code> for Spanish.
: The two can be combined; for example, <code>{{<nowiki />wlink|Vandalisme|s=fr:wp}}</code> links 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

Revision as of 17:20, 19 May 2025

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)
Alternative name of the link, or the text to be displayed.
{{{s}}} (optional)
A named parameter used to specify namespaces on Wikipedia such as wp (Wikipedia project pages), help (help pages), and module (Lua modules).
Non-English languages can also be linked using ISO 639-1 abbreviations; for example, fr for French and es for Spanish.
The two can be combined; for example, {{wlink|Vandalisme|s=fr:wp}} links 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