Template:Template rating/doc

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Basic usage:

{{Template rating|rating}}

Without categories:

{{Template rating|rating|nocat=true}}

Template automatically detects if in module or template namespace, and displays the applicable notice.

Also detects if template or module protected from editing, the template will automatically display a message regarding that too. The reason can optionally be specified, it must be written in full using the |reason= parameter. This must be a full message and not one word like the reasons on Template:Protection padlock § Reasons.

If the documentation subpage is also protected, {{Protection padlock}} can be manually generated on it when it is transcluded by declaring |doc-reason= the same value as you would enter in |1= in {{Protection padlock}}, and |doc-action= the same as the parameter of the name which is the protection action—must be one of edit (default; for normal protection), move (for move-protection) or autoreview (for pending changes): {{Template rating|rating|reason for documentation protection|action=the restricted action on documentation like move or edit}}

If {{Template rating}} is used outside the Template or Module namespace, an error message is displayed instead and will be categorized under Category:Pages with templates in the wrong namespace (50).

For templates, the rating |1= can be:

  • {{Template rating|pre-alpha}}
  • {{Template rating|alpha}}
  • {{Template rating|beta}}
  • {{Template rating|release}}
  • {{Template rating|protected}} – deprecated but still accepted and displays equivalent as release; previously showed another protection message that was redundant to the message automatically shown by Template:Template rating/protected.

For modules, the rating |1= can be:

  • {{Template rating|pre-alpha}}
  • {{Template rating|alpha}}
  • {{Template rating|beta}}
  • {{Template rating|release}}
  • {{Template rating|broken}}
  • {{Template rating|deprecated}}

All parameter values are case-insensitive.

Template will not autocategorize if |nocat= set to true.

Examples

[edit source]

Module with protection

[edit source]

The protection is automatically detected, but this is what it would look like on Module:String for example which is fully-protected.

{{Template rating|release|reason=template|action=edit}}
                -->

TemplateData

[edit source]

Used to mark the status of a template as one of pre-alpha, alpha, beta, release, or protected

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Rating1

The rating level of the template or module.

Suggested values
pre-alpha alpha beta release broken deprecated
Stringrequired
Nocatnocat

Suppress categories.

Default
false
Example
true
Booleanoptional
Replacement (if deprecated)replaced

If module is set to deprecated, then give wikilink of module that replace it if one exists.

Example
[[Module:Example]]
Page nameoptional
Message (if deprecated)message

If module is set to deprecated, then give optional message to append.

Contentoptional
Suppress protection templatesuppress-pp

Suppress the protection template with any value.

Example
true
Stringoptional
Reason for protection (if protected)reason

Reason for protection; may be one of: blp, dispute, dmca, mainpage, office, reset, sock, template, usertalk, vandalism

Suggested values
vandalism template dispute dmca mainpage reset
Stringoptional
Reason for protection of /doc subpage (if protected)doc-reason 2

Reason for protection of doc subpage; may be one of: blp, dispute, dmca, mainpage, office, reset, sock, template, usertalk, vandalism

Suggested values
vandalism template dispute dmca mainpage reset
Stringoptional
Action restricted (if protected)action

Action which is restricted. Must be one of "edit" (for normal protection), "move" (for move-protection) or "autoreview" (for pending changes).

Suggested values
edit move autoreview
Stringoptional
Action restricted of /doc subpage (if protected)doc-action 3

Action which is restricted. Must be one of "edit" (for normal protection), "move" (for move-protection) or "autoreview" (for pending changes).

Suggested values
edit move autoreview
Unknownoptional
demospacedemospace

no description

Unknownoptional
demopagedemopage

no description

Unknownoptional
demoleveldemolevel

no description

Unknownoptional

Tracking categories

[edit source]

It autocategorizes into (unless |nocat= set to true):

These categories are suppressed on pages ending with /doc and /sandbox. To suppress categories on all pages, you can use |nocat=true.

Error tracking: