Template:InfoBox guide

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 a Guide article in a right-floated box.

No parameters need to be passed to the template in order to for to properly link to the guide article if the guide article is in the standard {{PAGENAME}}/Guide location.

Tip
A hard-coded {{PAGENAME}}/Guide location has been used for this template in order to provide a predictable location for documents once maintained by the official Gentoo documentation project. To reference a guide internal to the wiki that has a location that is not {{PAGENAME}}/Guide, give the template the name of the guide page postpended with a hash, i.e. {{InfoBox guide|<title of guide page>#}}. External guides can be linked using the raw= parameter.

Parameters

Parameter name Required? Default value Description
Anonymous parameter 1 Yes (n/a) Page name (see below).
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 Guide Can be used to change the link text.
raw No (n/a) If present, the anonymous parameter value is interpreted as a raw URL to link to using an external-style link.

In ordinary usage, the value of the required anonymous parameter must match the title of an article that has a subpage named "/Guide". For example, the value Samba will give a link to Samba/Guide.

In rare cases, the guide may be at a page with a different title, in which case the value of the required anonymous parameter must be a raw URL (in the form http://example.com/path, http://example.com/path, or //example.com/path) and the raw parameter must be set to any value (yes is a good choice).

Usage

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

Correct

One anonymous parameter (a guide title)
Wiki code
{{InfoBox stack
| {{InfoBox guide|Samba}}
}}
Main version
Sandbox version


Using header=true
Wiki code
{{InfoBox stack
| {{InfoBox guide|Samba|header=true}}
}}
Main version
Resources
Sandbox version
Resources


Indicating a raw URL using raw
Wiki code
{{InfoBox stack
| {{InfoBox guide|https://wiki.gentoo.org/wiki/Samba|raw=true}}
}}
Main version
Sandbox version


Specifying link text using text
Wiki code
{{InfoBox stack
| {{InfoBox guide|Samba|text=Other text}}
}}
Main version
Sandbox version


Incorrect

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


Used outside of an {{InfoBox stack}} (wide box, not right-floated)
Wiki code
{{InfoBox guide|Samba}}
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 guide/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.)