Template:Error

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 to display an error message when a template is being used incorrectly. Articles that trigger such error messages will be added to Category:Misused templates.

Parameters

Parameter name Required? Default value Description
Anonymous parameter 1 Yes (n/a) Name of the template that is calling this template.
Anonymous parameter 2 Yes (n/a) Name of the parameter in that template that is triggering the error message.

The second anonymous parameter can be set to either 11 or 21 to display special built-in messages about too many anonymous parameters being used, as shown below.

Usage

See the template's testcases:

Correct

Two anonymous parameters
Wiki code
{{Error|template|parameter}}
Main version
{{template template error}}
Parameter parameter not defined. For correct usage see template template's documentation on the parameter parameter.
Sandbox version
{{template template error}}
Parameter parameter not defined. For correct usage see template template's documentation on the parameter parameter.


Two anonymous parameters, with the second set to 11
Wiki code
{{Error|template|11}}
Main version
{{template template error}}
Too many anonymous parameters. Maximum is 11. For correct usage see template template's documentation on the 11 parameter.
Sandbox version
{{template template error}}
Too many anonymous parameters. Maximum is 11. For correct usage see template template's documentation on the 11 parameter.


Two anonymous parameters, with the second set to 21
Wiki code
{{Error|template|21}}
Main version
{{template template error}}
Too many anonymous parameters. Maximum is 21. For correct usage see template template's documentation on the 21 parameter.
Sandbox version
{{template template error}}
Too many anonymous parameters. Maximum is 21. For correct usage see template template's documentation on the 21 parameter.


Incorrect

No parameter (error message for this template, instead of the template it is used in)
Wiki code
{{Error}}
Main version
{{Error}}
Anonymous parameter 1 not defined. For correct usage see the Error template's documentation.
Sandbox version
{{Error}}
Anonymous parameter 1 not defined. For correct usage see the Error template's documentation.


One anonymous parameter (error message for this template, instead of the template it is used in)
Wiki code
{{Error|template}}
Main version
{{Error}}
Anonymous parameter 2 not defined. For correct usage see the Error template's documentation on the {{{2}}} parameter.
Sandbox version
{{Error}}
Anonymous parameter 2 not defined. For correct usage see the Error template's documentation on the {{{2}}} parameter.
Note
The above documentation is transcluded from Template:Error/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.)