Help:Template

A template is a piece of predefined wikitext that can be inserted into an article. Templates are primarily used to aid in formatting content. Many of these templates were inherited from the Arch Linux Wiki.

Usage
Templates are used by adding the following markup to an article:

Most templates take additional arguments, such as Template:Note:

which produces:

Some templates use named parameters, such as Template:hc:

which produces:

The general format is:

See each template's page for specific usage instructions.

Style

 * Templates should be used with the capitalization shown in the examples in their pages, for example {{ic|&#123;{Pkg&#124;...}} and {{ic|&#123;{ic&#124;...}} are correct, while {{ic|&#123;{pkg&#124;...}} and {{ic|&#123;{Ic&#124;...}} are not.
 * There should be no spaces around the template name: {{ic|&#123;{Template name&#124;...}} is correct, while for example {{ic|&#123;{ Template name &#124;...}} is not.
 * Templates should not be categorized.

Escape template-breaking characters
There are some characters that, if used inside a template, will break its output: most frequently this happens with "=" (the equal sign) and "|" (the pipe sign). Solutions to this problem are described below.

Named and numbered parameters
If the problem is only with "=" signs, the recommended solution is to explicitly introduce template parameters with their positional numbers or names.

Example:

Result:

This is very useful for:


 * Variable definitions.


 * External links with query strings in URLs.


 * Shell strings and commands.


 * Lines of code.

Multiple parameters

 * Using positional parameters and

Result:


 * Using named parameters and

Result:

nowiki tags
If you are having problems with characters other than "=", e.g. "|", the recommended solution is to enclose the whole parameter in tags. This method displays all kinds of characters, but completely prevents the wiki engine from processing text markup, such as links and other templates. For example:

https://www.archlinux.org/ &lt;/nowiki>}}

https://www.archlinux.org/ }}

Enclosing only specific parts (or even single characters) in tags still works of course, but for readability it is recommended to use such method only if links or other templates have to be normally displayed. For example:

&lt;/nowiki> https://www.archlinux.org/ }}

https://www.archlinux.org/ }}

HTML entities
Replacing the offending characters with their respective HTML entities always works, but since it reduces the readability of the source text, it is recommended only when the solutions above are not practicable. For example:

Creation
The following template should be used when creating new templates to facilitate usage and editing:

A brief description of the template

Usage
&lt;nowiki&gt;&lt;/nowiki&gt;

Example
Template code goes here...

To begin the creation process, simply visit Template:Template name (substituting with the desired name of the template), edit, and add the relevant wikitext.

List of templates
The templates that users can use directly in articles on the ArchWiki are listed below. Click on the links to see their detailed usage. For a list that also includes localizations and meta templates see Special:AllPages/Template:, Special:PrefixIndex/Template: or Special:MostLinkedTemplates.

Testing

 * Template:Sandbox
 * Template:Lorem Ipsum

Code formatting templates
Inherited from the Arch Linux Wiki.


 * Template:ic
 * Template:bc
 * Template:hc

Note templates
Inherited from the Arch Linux Wiki.


 * Template:Note
 * Template:Tip
 * Template:Warning