Template:Wikipedia/doc: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{dochead}}
{{dochead}}{{wikipedia}}{{lua|Variable arguments}}{{templatestyles}}
The '''Wikipedia''' template shows a right-floating sister-project box with a link to a single English Wikipedia page. It was inspired by [[Wiktionary:Template:wikipedia|the corresponding template on the English Wiktionary]], which includes many more features that are not implemented in this simplified version of the template.
 
=== Usage ===
=== Usage ===
{{{{ROOTPAGENAME}} }}
The template should be placed at the beginning of the page it refers to, immediately after hatnotes if there are any. If there are also images, box templates such as this should appear first. Alternatively, consider linking to Wikipedia in the "External links" section; see [[Special: Interwiki]] for tips on adding such links.
The template should be placed at the beginning of the page it refers to, immediately after hatnotes if there are any. If there are also images, box templates such as this should appear first. Alternatively, consider linking to Wikipedia in the "External links" section; see [[Special:Interwiki]] for tips on adding such links.


The template can also be placed at the beginning of a section. In that case, the title of the Wikipedia page must be explicitly given as a [[#Parameters|parameter]].
The template can also be placed at the beginning of a section. In that case, the title of the Wikipedia page must be explicitly given as a [[#Parameters|parameter]].{{clear}}
{{clear}}


=== Parameters ===
=== Parameters ===
All parameters are optional. Pass in all pages to link to as an arbitrary number of unnamed arguments:
All parameters are optional. Pass in all pages ''in addition to the name of the page itself'' to link to as an arbitrary number of unnamed arguments.
 
For example, placing this on the page [[Frequently asked questions]]:
 
<pre>{{Wikipedia|Frequently asked questions|page1|page2|page3}}</pre>
 
will yield:


<code>{{<nowiki />wikipedia|''page1''|''page2''|''page3''|...}}</code>
{{Wikipedia|Frequently asked questions|page1|page2|page3}}{{clear}}


If you intend to link multiple pages ''and'' the Wikipedia article with the same name as the current article, add in <code>pname=true</code>.
If you do not wish to link the page with the current page's name, simply omit it. For example, placing <code><nowiki>{{wikipedia|''page1''|''page2''|''page3''}}</nowiki></code> on [[Frequently asked questions]] will yield the same result as above, but without the link to [[Frequently asked questions]].


=== See also ===
=== See also ===
* {{modlink|Variable arguments}}
* [[Template:Wlink]] – for formatting inline links to Wikipedia articles.