Template:InfoBox package

From Gentoo Wiki
Jump to:navigation Jump to:search
[edit

Documentation

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 package information at packages.gentoo.org in a right-floated box.

To provide a link to package information in running text (or in a list), use {{Package}}.

Parameters

Parameter name Required? Default value Description
Anonymous parameter 1 Yes (n/a) Package name in the form category-subcategory/name.
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 Package information Can be used to change the link text.

The value of the required anonymous parameter must match the name of a package in the Gentoo repository (popularly known as the "Portage tree"). The template does no checking of its input but simply links to the provided name. Valid package names can be determined using emerge on a running Gentoo system or by searching or browsing the repository online.

The text parameter can be used to distinguish between multiple instances of this template in the same InfoBox stack, should that be necessary.

Usage

{{InfoBox package}}
{{InfoBox package|cat-subcat/name}}
{{InfoBox package|cat-subcat/name|text=}}

See the template's testcases:

Correct

One anonymous parameter (a package name)
Wiki code
{{InfoBox stack
| {{InfoBox package|app-admin/sudo}}
}}
Main version
Sandbox version


Using header=true
Wiki code
{{InfoBox stack
| {{InfoBox package|app-admin/sudo|header=true}}
}}
Main version
Sandbox version


Specifying link text using text
Wiki code
{{InfoBox stack
| {{InfoBox package|www-client/firefox-bin|text=Binary package information}}
}}
Main version
Sandbox version


Incorrect

No parameter (error message)
Wiki code
{{InfoBox stack
| {{InfoBox package}}
}}
Main version
{{InfoBox package template error}}
Parameter 1 not defined. For correct usage see InfoBox package template's documentation on the 1 parameter.
Sandbox version
{{InfoBox package template error}}
Parameter 1 not defined. For correct usage see InfoBox package template's documentation on the 1 parameter.


Used outside of an {{InfoBox stack}} (wide box, not right-floated)
Wiki code
{{InfoBox package|app-admin/sudo}}
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)
Note
The above documentation is transcluded from Template:InfoBox package/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)