Template:InfoBox wikipedia/doc

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages.

As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.

Use this template inside an {{InfoBox stack}} to provide a link to a Wikipedia article in a right-floated box.

Parameters

Parameter name Required? Default value Description
Anonymous parameter 1 No {{BASEPAGENAME}} Wikipedia article title.
header No (n/a) Set this to yes or true to display a Resources heading, but only if the infobox is the first one in an {{InfoBox stack}}.
text No Wikipedia Can be used to change the link text.
page No (n/a) Can be used to specify a different page title (useful for testing or documentation purposes).

It should not be necessary to specify page in normal calls to this template. In cases where the Wikipedia article title differs from the Gentoo Wiki page title, use the anonymous parameter to specify the target title.

Usage

This template must be used inside of an {{InfoBox stack}}, as seen in the template's testcases:

Correct

No parameter (uses current page title)
Wiki code
{{InfoBox stack
| {{InfoBox wikipedia}}
}}
Main version
Sandbox version


↑ Editors using this template should make sure that the resulting link actually works. As seen by following the link(s) above, if the target Wikipedia article doesn't exist then readers will end up at a sort of "error page".


One anonymous parameter (a Wikipedia article title)
Wiki code
{{InfoBox stack
| {{InfoBox wikipedia|Gentoo Linux}}
}}
Main version
Sandbox version


Using header=true
Wiki code
{{InfoBox stack
| {{InfoBox wikipedia|Gentoo Linux|header=true}}
}}
Main version
Resources
Sandbox version
Resources


Specifying link text using text
Wiki code
{{InfoBox stack
| {{InfoBox wikipedia|Gentoo Linux|text=Other text}}
}}
Main version
Sandbox version


Language detection test
Wiki code
{{InfoBox stack
| {{InfoBox wikipedia|page=LongTitle|header=true}}
| {{InfoBox wikipedia|page=LongTitle/en}}
| {{InfoBox wikipedia|page=LongTitle/de}}
| {{InfoBox wikipedia|page=LongTitle/Longer/de}}
| {{InfoBox wikipedia|page=dd}}
}}
Main version
Sandbox version


↑ Any page title ending in a slash follwed by two letters (i.e., a 2-letter subpage title) is interpreted as an article translated into the language with that ISO 639-1 code, resulting in a link to the Wikipedia for that language (assuming it exists).

Incorrect

Used outside of an {{InfoBox stack}} (wide box, not right-floated)
Wiki code
{{InfoBox wikipedia}}
Main version
Sandbox version


See also[edit]

The templates below are implemented using {{InfoBox}}. They should also appear in Category:InfoBox templates, which may be more complete than this list.

These templates should be used within an {{InfoBox stack}}. Each should provide its own header parameter, but if necessary {{InfoBox header}} can be used.

Underlined text indicates the default heading provided by header=true for each type of template.

For use in articles
Resources
Article status
For use on talk pages
Talk status
(Note that the simpler {{Talk}} can be used in place of both of these.)
For use on user pages
User info
Babel (spoken-language indicators)
https://wiki.gentoo.org/wiki/Template:InfoBox_wikipedia/doc
wiki.gentoo.org
crawl=CC-MAIN-2022-21
47149
application/http; msgtype=response
sha1:WXAWNVGSRB33XCIGO574Q4CVBO655HJX
<urn:uuid:cdbecf36-c12b-44d4-a7ab-b64fd18731c1>
2022-05-22T20:46:15Z
204.187.15.5
text/html
sha1:C6J4QBSEKWBFUTMO6YFCHXJY6A6BNJ3E
<urn:uuid:e2524bee-d9cc-42be-a780-5ce8cb3a40fd>
https://wiki.gentoo.org/wiki/Template:InfoBox_wikipedia/doc
response
<urn:uuid:815f607f-09ec-4913-a504-08139f79ea0d>
isPartOf: CC-MAIN-2022-21
publisher: Common Crawl
description: Wide crawl of the web for May 2022
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-55
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/