Difference between revisions of "Template:wpl"
Line 1: | Line 1: | ||
− | [[wikipedia:{{{1}}}|{{#if:{{{4|}}}||<span style="color:#477979 !important;" title="Wikipedia: {{{1}}}">}}{{#replace:{{#replace:{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}|_|<nowiki> </nowiki> <nowiki> </nowiki>}}|#|<nowiki> </nowiki> § <nowiki> </nowiki>}}</span>]]{{{3|}}}<sup>[[File:Wikipedia | + | [[wikipedia:{{{1}}}|{{#if:{{{4|}}}||<span style="color:#477979 !important;" title="Wikipedia: {{{1}}}">}}{{#replace:{{#replace:{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}|_|<nowiki> </nowiki> <nowiki> </nowiki>}}|#|<nowiki> </nowiki> § <nowiki> </nowiki>}}</span>]]{{{3|}}}<sup>[[File:Wikipedia-W.svg|12x8px|link=wp:{{{1}}}]]</sup><noinclude>{{doc2}}</noinclude> |
Revision as of 00:21, 31 December 2019
[edit] Documentation
Usage
This is a template for in-line linking to Wikipedia within articles, because (a) using a piped link with the [[wp:]] prefix creates a link that is hard to distinguish from an internal link and may confuse the reader; and (b) it allows for inter-language links.
If the name of the Wikipedia article is the same as the desired text of the link, use just:
{{wpl|name of Wikipedia article}}
which gives: name of Wikipedia article
If you want to put some other text in the link or format it in some special way, you need to pass it as the 2nd parameter:
{{wpl|name of Wikipedia article|alternative text}}
which gives: alternative text
The template also enables use of the § sign, thus:
{{wpl|name of Wikipedia article#section title}}
which gives: name of Wikipedia article § section title
To avoid leaving a large space before a punctuation sign, leave the second parameter blank and use the punctuation sign as a 3rd parameter. For example:
{{wpl|Conservapedia||,}}
gives: Conservapedia,
To link to a different language Wikipedia site, eg "de", then:
{{wpl|Freiberger_Lebensmittel|site=de}}
which gives: Freiberger Lebensmittel
When using this template eg. inside an internal toc, such as Template:Info Influencers, the size of the 'W' needs to be 9x6px (because the font-size is 85%). So:
{{wpl|name of Wikipedia article|sz=9x6}}
which gives: name of Wikipedia article
Original source: RationalWiki