Template:Wikipedia: Difference between revisions
Jump to navigation
Jump to search
(Created.) |
(Updated documentation and added category) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#switch: {{{2|}}}| long = | <includeonly>{{#switch: {{{2|}}}| long = {{SmallIcon|Wikipedia w.png}} [https://en.wikipedia.org/wiki/{{#replace:{{{1}}}| |%5F}} {{{3|{{{1}}}}}}] on [https://en.wikipedia.org/wiki/Main_Page Wikipedia]|{{SmallIcon|Wikipedia w.png}} [https://en.wikipedia.org/wiki/{{#replace:{{{1}}}| |%5F}} {{{2|{{{1}}}}}}]}}</includeonly><noinclude>{{documentation|content= | ||
Display an external link to a page on Wikipedia. | |||
{{ | There are two available formats: the default compact version suitable for inline use and a longer form suitable for lists in "External links" sections of articles. | ||
== Examples == | |||
{{Template demo | |||
| style = table | |||
| <nowiki>{{Wikipedia|Illithid}}</nowiki> | |||
| <nowiki>{{Wikipedia|Illithid|Mind Flayer}}</nowiki> | |||
| <nowiki>{{Wikipedia|Illithid|long}}</nowiki> | |||
| <nowiki>{{Wikipedia|Illithid|long|Mind Flayer}}</nowiki> | |||
}} | |||
== See also == | |||
{{ | * {{t link|FRWiki}} | ||
== Template data == | |||
{ | <templatedata> | ||
{ | |||
"description": "Link to an external page on Wikipedia.", | |||
"format": "inline", | |||
"params": { | |||
"1": { | |||
"label": "Page name", | |||
"description": "The Wikipedia page to link to.", | |||
"type": "wiki-page-name", | |||
"required": true | |||
}, | |||
"2": { | |||
"label": "alias OR long", | |||
"description": "This parameter is either used to specify the long format or to provide alternative text for the link.", | |||
"suggestedvalues": ["long"], | |||
"type": "string" | |||
}, | |||
"3": { | |||
"label": "alias", | |||
"description": "If the second parameter was \"long\", this parameter is instead used for the alias.", | |||
"type": "string" | |||
} | |||
} | |||
} | |||
</templatedata>}} | |||
[[Category:Templates]] | |||
[[Category:Link templates]] | |||
[[Category:External link templates]] | |||
</noinclude> |
Latest revision as of 20:43, 21 July 2024
Template documentation
Display an external link to a page on Wikipedia.
There are two available formats: the default compact version suitable for inline use and a longer form suitable for lists in "External links" sections of articles.
Examples
Markup | Renders as |
---|---|
{{Wikipedia|Illithid}} | Illithid |
{{Wikipedia|Illithid|Mind Flayer}} | Mind Flayer |
{{Wikipedia|Illithid|long}} | Illithid on Wikipedia |
{{Wikipedia|Illithid|long|Mind Flayer}} | Mind Flayer on Wikipedia |
See also
- {{FRWiki}}
Template data
Link to an external page on Wikipedia.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Page name | 1 | The Wikipedia page to link to. | Page name | required |
alias OR long | 2 | This parameter is either used to specify the long format or to provide alternative text for the link.
| String | optional |
alias | 3 | If the second parameter was "long", this parameter is instead used for the alias. | String | optional |