Jump to content

Template:Template rating/doc: Difference between revisions

From Noumenapedia
add tracking cat
 
m 1 revision imported
 
(No difference)

Latest revision as of 16:05, 9 September 2026

__EXPECTED_UNCONNECTED_PAGE__

Usage

Basic usage:

<syntaxhighlight lang=wikitext>

Lua error in Module:Effective_protection_level at line 64: attempt to index field 'TitleBlacklist' (a nil value).

                --></syntaxhighlight>

Without categories:

<syntaxhighlight lang=wikitext>

Lua error in Module:Effective_protection_level at line 64: attempt to index field 'TitleBlacklist' (a nil value).

                --></syntaxhighlight>

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 <syntaxhighlight lang="wikitext" inline style="display: none;" />|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 <syntaxhighlight lang="wikitext" inline style="display: none;" />|doc-reason= the same value as you would enter in <syntaxhighlight lang="wikitext" inline style="display: none;" />|1= in {{Protection padlock}}, and <syntaxhighlight lang="wikitext" inline style="display: none;" />|doc-action= the same as the parameter of the name which is the protection action—must be one of

  1. REDIRECT Template:Parameter value

__EXPECTSHORTPAGE__ (default; for normal protection),

  1. REDIRECT Template:Parameter value

__EXPECTSHORTPAGE__ (for move-protection) or

  1. REDIRECT Template:Parameter value

__EXPECTSHORTPAGE__ (for pending changes): <syntaxhighlight lang=wikitext inline>

Lua error in Module:Effective_protection_level at line 64: attempt to index field 'TitleBlacklist' (a nil value).

                --></syntaxhighlight>

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 (0).

For templates, the rating <syntaxhighlight lang="wikitext" inline style="display: none;" />|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 <syntaxhighlight lang="wikitext" inline style="display: none;" />|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 <syntaxhighlight lang="wikitext" inline style="display: none;" />|nocat= set to

  1. REDIRECT Template:Parameter value

__EXPECTSHORTPAGE__.

Examples

Module with protection

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

Lua error in Module:Effective_protection_level at line 64: attempt to index field 'TitleBlacklist' (a nil value).

                -->

</syntaxhighlight>

TemplateData

<templatedata> { "description": "Used to mark the status of a template as one of pre-alpha, alpha, beta, release, or protected", "params": { "1": { "label": "Rating", "description": "The rating level of the template or module.", "type": "string", "required": true, "suggestedvalues": [ "pre-alpha", "alpha", "beta", "release", "broken", "deprecated" ] }, "nocat": { "label": "Nocat", "description": "Suppress categories.", "type": "boolean", "default": "false", "example": "true" }, "demospace": {}, "replaced": { "label": "Replacement (if deprecated)", "description": "If module is set to deprecated, then give wikilink of module that replace it if one exists.", "example": "Module:Example", "type": "wiki-page-name" }, "message": { "label": "Message (if deprecated)", "description": "If module is set to deprecated, then give optional message to append.", "type": "content" }, "demopage": {}, "suppress-pp": { "label": "Suppress protection template", "description": "Suppress the protection template with any value.", "example": "true", "type": "string" }, "reason": { "label": "Reason for protection (if protected)", "description": "Reason for protection; may be one of: blp, dispute, dmca, mainpage, office, reset, sock, template, usertalk, vandalism", "type": "string", "suggestedvalues": [ "vandalism", "template", "dispute", "dmca", "mainpage", "reset" ] }, "doc-reason": { "aliases": [ "2" ], "label": "Reason for protection of /doc subpage (if protected)", "description": "Reason for protection of doc subpage; may be one of: blp, dispute, dmca, mainpage, office, reset, sock, template, usertalk, vandalism", "type": "string", "suggestedvalues": [ "vandalism", "template", "dispute", "dmca", "mainpage", "reset" ] }, "action": { "label": "Action restricted (if protected)", "description": "Action which is restricted. Must be one of \"edit\" (for normal protection), \"move\" (for move-protection) or \"autoreview\" (for pending changes).", "type": "string", "suggestedvalues": [ "edit", "move", "autoreview" ] }, "doc-action": { "aliases": [ "3" ], "label": "Action restricted of /doc subpage (if protected)", "description": "Action which is restricted. Must be one of \"edit\" (for normal protection), \"move\" (for move-protection) or \"autoreview\" (for pending changes).", "suggestedvalues": [ "edit", "move", "autoreview" ] }, "demolevel": {} }, "paramOrder": [ "1", "nocat", "replaced", "message", "suppress-pp", "reason", "doc-reason", "action", "doc-action", "demospace", "demopage", "demolevel" ], "format": "block" } </templatedata>

Tracking categories

It autocategorizes into (unless <syntaxhighlight lang="wikitext" inline style="display: none;" />|nocat= set to

  1. REDIRECT Template:Parameter value

__EXPECTSHORTPAGE__):

These categories are suppressed on pages ending with /doc and /sandbox. To suppress categories on all pages, you can use <syntaxhighlight lang="wikitext" inline style="display: none;" />|nocat=true.

Error tracking: