Difference between revisions of "Template:wpl/doc"

From WikiCorporates
Jump to navigation Jump to search
m (GrayanOne moved page Template:Wpl/doc to Template:wpl/doc without leaving a redirect)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{Breadcrumbs|[[Template:wpl]]|doc}}
 
=== Usage ===
 
=== Usage ===
−
This is a template for in-line linking to Wikipedia '''in articles''', because using a piped link with the <nowiki>[[wp:]]</nowiki> prefix creates a link that is hard to distinguish from an internal link and may confuse the reader.
+
This is a template for in-line linking to Wikipedia '''within articles''', because (a) using a piped link with the <nowiki>[[wp:]]</nowiki> 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.
  
−
Like the other Wikipedia templates, it's best to use this template sparingly.
+
If the name of the Wikipedia article is the same as the desired text of the link, use just:<br/>
 +
<tt><nowiki>{{wpl|name of Wikipedia article}}</nowiki></tt><br/>
 +
which gives: {{wpl|name of Wikipedia article}}
  
−
If the name of the Wikipedia article is the same as the desired text of the link, use just
+
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:<br/>
−
<nowiki>{{wpl|name of Wikipedia article}}</nowiki>
+
<tt><nowiki>{{wpl|name of Wikipedia article|alternative text}}</nowiki></tt><br/>
 +
which gives: {{wpl|name of Wikipedia article|''alternative text''}}
  
−
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 second parameter:
+
The template also enables use of the &sect; sign, thus:<br/>
−
<nowiki>{{wpl|name of Wikipedia article|''alternative'' text}}</nowiki>
+
<tt><nowiki>{{wpl|name of Wikipedia article#section title}}</nowiki></tt><br/>
 +
which gives: {{wpl|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 third parameter. For example:
+
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:<br/>
−
<nowiki>{{wpl|Conservapedia||,}}</nowiki>
+
<tt><nowiki>{{wpl|Conservapedia||,}}</nowiki></tt><br/>
−
results in {{wpl|Conservapedia||,}}
+
gives: {{wpl|Conservapedia||,}}
  
−
Source: [https://rationalwiki.org/wiki/Template:Wpl RationalWiki]
+
To link to a different language Wikipedia site, ''eg'' "de", then:<br/>
 +
<tt><nowiki>{{wpl|Freiberger_Lebensmittel|site=de}}</nowiki></tt><br/>
 +
which gives: {{wpl|Freiberger_Lebensmittel|site=de}}
  
−
<includeonly>[[Category:WikiPolitiks templates]]</includeonly>
+
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:<br/>
 +
<tt><nowiki>{{wpl|name of Wikipedia article|sz=9x6}}</nowiki></tt><br/>
 +
which gives: {{wpl|name of Wikipedia article|sz=9x6}}
 +
 
 +
 
 +
''Original source: [https://rationalwiki.org/wiki/Template:Wpl RationalWiki]''
 +
 
 +
<includeonly>[[Category:WikiCorporates templates]]</includeonly>

Latest revision as of 18:59, 9 December 2020

< Template:wpl < doc

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 articleWikipedia-W.svg

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 textWikipedia-W.svg

The template also enables use of the § sign, thus:
{{wpl|name of Wikipedia article#section title}}
which gives: name of Wikipedia article § section titleWikipedia-W.svg

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,Wikipedia-W.svg

To link to a different language Wikipedia site, eg "de", then:
{{wpl|Freiberger_Lebensmittel|site=de}}
which gives: Freiberger LebensmittelWikipedia-W.svg

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 articleWikipedia-W.svg


Original source: RationalWiki