Template:Wikipedia: Difference between revisions

From bg3.wiki
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 = * {{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>[[Category:Templates]]
<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=
Test: {{Wikipedia|Mind Flayer}} or {{Wikipedia|Mind Flayer|Description}}
Display an external link to a page on Wikipedia.


{{InfoBlob|<nowiki>Test: {{Wikipedia|Mind Flayer}} or  {{Wikipedia|Mind Flayer|Description}}</nowiki>}}
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>
}}


Or try the long version:
== See also ==
{{Wikipedia|Minsc|long}}
* {{t link|FRWiki}}


{{InfoBlob|<nowiki>{{Wikipedia|Minsc|long}}</nowiki>}}
== Template data ==
{{Wikipedia|Jaheira|long|Yes oh omnipresent authority figure}}
<templatedata>
 
{
{{InfoBlob|<nowiki>{{Wikipedia|Jaheira|long|Yes oh omnipresent authority figure}}</nowiki>}}
    "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

Template data

Link to an external page on Wikipedia.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Page name1

The Wikipedia page to link to.

Page namerequired
alias OR long2

This parameter is either used to specify the long format or to provide alternative text for the link.

Suggested values
long
Stringoptional
alias3

If the second parameter was "long", this parameter is instead used for the alias.

Stringoptional