Template:InfoBox/doc
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.
This template can be used inside of an {{InfoBox stack}} to display a right-floated infobox in an article. More commonly, however, it is used (without {{InfoBox stack}}) to define other specialized kinds of infobox templates that can be used in articles.
To link to this InfoBox in the article use #infobox
.
If this template is being considered for use in an article (or other page outside of the Template: namespace), it is very likely that one of the more specific infobox templates listed at the bottom of this page would be more appropriate.
Parameters
Parameter name | Required? | Default value | Description |
---|---|---|---|
info |
Yes | (n/a) | Main message to display. |
header |
No | (n/a) | Optional heading to display above the message. |
icon |
No | (n/a) | Name of FontAwesome icon to display. (Do not include fa- prefix.)
|
id |
No | (n/a) | Identifier to display to the left of the message, if icon is not used. (Can be text or a small image.)
|
anchor |
No | (n/a) | A target used for hyperlinking. (See test cases below.) |
category |
No | (n/a) | First category. (See explanation below.) |
category2 |
No | (n/a) | Second category. |
category3 |
No | (n/a) | Third category. |
catmaskns |
No | Template |
Mask category link(s) when the template is used on a page in the given namespace. |
Either icon
or id
can be used, but not both. If both are specified, icon
will be used and id
ignored.
The values of category
, category2
, and category3
should match the name of an existing category on this wiki, without the Category: prefix. Setting any of these parameters (or catmaskns
) is generally only useful when this template is being used to define another template. To be specific, consider that {{InfoBox wikify}} is defined using a call to {{InfoBox}}
containing category=Wikify articles
. So pages on which {{InfoBox wikify}}
is placed will appear in Category:Wikify articles. (Note that the categories that Template:InfoBox wikify itself appears in are listed on Template:InfoBox wikify/doc, as explained on Help:Templates.)
Usage
Typical usage on a regular wiki page:
{{InfoBox|info=Message text|icon=icon-name|header=Heading}} {{InfoBox|info=Message text|id=identifier|header=Heading}}
- When used on a regular page, this template must appear inside of an {{InfoBox stack}}, as seen in the testcases below; multiple {{InfoBox}} templates can be listed inside a single {{InfoBox stack}} call.
All parameters, when defining a template:
{{InfoBox|info=|icon=|header=|category=|category2=|category3=|catmaskns=}} {{InfoBox|info=|id=|header=|category=|category2=|category3=|catmaskns=}}
- When used to define another template, this template must not appear inside of an {{InfoBox stack}}.
See the template's testcases:
Correct
info
containing message to display (the minimum required to get something useful){{InfoBox stack | {{InfoBox|info=Some text}} }}
icon
and header
{{InfoBox stack | {{InfoBox|info=Some text|icon=rocket|header=Some heading}} }}
Some heading
Some heading
anchor
containing a hyperlink target (#click_me){{InfoBox stack | {{InfoBox|anchor=click_me|info=Some text}} }}
id
(instead of an icon) and header={{InfoBox header}}
{{InfoBox stack | {{InfoBox|info=Some text|id=Some id| header={{InfoBox header|Some heading}} }} }}
id
can be either plain (or formatted) text or a small image. Note that either type of header
(with or without {{InfoBox header}}
) can be used with either icon
or id
.)Incorrect
{{InfoBox stack | {{InfoBox}} }}
info
parameter.info
parameter.
{{InfoBox}}
info
parameter.info
parameter.
info
parameter, not inside of {{InfoBox stack}} (Large box, not right-floated){{InfoBox|info=Foo}}
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
- {{InfoBox blog}} – Link to a blog.
- {{InfoBox codeberg}} – Link to Codeberg repository.
- {{InfoBox github}} – Link to GitHub repository.
- {{InfoBox gitlab}} – Link to GitLab repository.
- {{InfoBox gitweb}} – Link to source code repository.
- {{InfoBox guide}} – Link to a Gentoo guide (on this wiki).
- {{InfoBox homepage}} – Link to the official home page for a piece of software or hardware.
- {{InfoBox irc}} – Link to an IRC channel.
- {{InfoBox manpage}} – Link to a man page.
- {{InfoBox odoc}} – Link to official documentation, guides, how-tos, tutorials, etc. (not user-provided documentation).
- {{InfoBox ohloh}} – Link to an Ohloh project.
- {{InfoBox package}} – Link to package information at Packages.Gentoo.org.
- {{InfoBox project}} – Link to the related Gentoo project (on this wiki).
- {{InfoBox sourcehut}} - Link to Sourcehut project.
- {{InfoBox wiki}} – Link to an official project wiki.
- {{InfoBox wikipedia}} – Link to a Wikipedia article.
- Article status
- {{InfoBox dated}} – Article information is out of date.
- {{InfoBox delete}} – Article should be deleted. ({{Delete}} is more noticeable.)
- {{InfoBox todo}} – TODO list for the article.
- {{InfoBox wikify}} – Article needs additional wiki-formatting.
- 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
- {{InfoBox user}} – Basic user information. (special heading: username of user page owner)
- {{InfoBox user dev}} – User is a Gentoo developer.
- {{InfoBox user since}} – When user started using Gentoo.
- Babel (spoken-language indicators)