Template:Class mask/doc
{{Documentation subpage}}
{{High-use|demo={{ROOTPAGENAME}}}}
{{lua|Module:Class mask|Module:Redirect}}
This template is designed for use in WikiProject banners, and provides an easy way to construct a bespoke class mask. The class parameter must be passed to the template as the first unnamed parameter.
Implementation in [[Module:WikiProject banner]]
The template provides the default class masks for WikiProject's quality scales, and is also used by a few projects which have opted out of the standard scale and use a custom class mask by setting {{para|QUALITY_CRITERIA|custom}} and {{para|QUALITY_SCALE|subpage}} in the WikiProject's banner template, and creating a /class subpage.
When used on a /class
subpage, the template should be called in the following way:
{{Class mask
|topic=
|all other optional parameters desired, one per line…
}}
The {{Tag|noinclude}} tags allow the documentation from {{Template link general|Class mask/templatepage|kbd=yes}} to be displayed directly on the banner template's /class
subpage, where it can provide useful information and category prompts for WikiProject admins and other interested users without any adverse effects to the banner template.
- the {{Para|topic}} parameter defines the main naming scheme of the assessment categories used by the project (i.e. the part of its assessment category names that comes after
Category:{{Var|Whatever}}-Class
and beforearticles
) and is used to check the existence of the categories that are required. For example, if your project uses categories such as:Category:B-Class mathematics articles
, etc., then set {{Para|topic|mathematics}}. - if the template uses task forces, the parameters {{Para|topic1}}, {{Para|topic2}}, {{Para|topic3}}, {{Para|topic4}}, {{Para|topic5}} and {{Para|topic6}} can be used to check for the corresponding categories needed by each.
Optional parameters
- If one or more of these nine is set to
no
, the class will be switched off. Their default isyes
: - {{Para|fa}} – {{Class/icon|FA}} Featured Article
- {{Para|fl}} – {{Class/icon|FL}} Featured List
- {{Para|a}} – {{Class/icon|A}} A-Class
- {{Para|ga}} – {{Class/icon|GA}} Good Article
- {{Para|b}} – {{Class/icon|B}} B-Class
- {{Para|c}} – {{Class/icon|C}} C-Class
- {{Para|start}} – {{Class/icon|Start}} Start-Class
- {{Para|stub}} – {{Class/icon|Stub}} Stub-Class
- {{Para|list}} – {{Class/icon|List}} List-Class
- {{Para|FQS}} – if set to
yes
, these seven additional assessment classes are activated (FQS stands for Full Quality Scale). Undesired classes may then be switched off individually by setting them tono
. When {{Para|FQS}} is absent, setting one or more toyes
will switch on only that class. - {{Para|category}} – {{Class/icon|Category}} Category-Class
- {{Para|disambig}} – {{Class/icon|Disambig}} Disambig-Class
- {{Para|draft}} – {{Class/icon|Draft}} Draft-Class
- {{Para|file}} – {{Class/icon|File}} File-Class
- {{Para|portal}} – {{Class/icon|Portal}} Portal-Class
- {{Para|project}} – {{Class/icon|Project}} Project-Class
- {{Para|template}} – {{Class/icon|Template}} Template-Class
- If either of these is set to
yes
, that class will be switched on. The default isno
, regardless of the {{Para|FQS}} setting: - {{Para|fm}} – {{Class/icon|FM}} Featured Media
- {{Para|redirect}} – {{Class/icon|FM}} Redirect-Class
- {{Para|forceNA}} - if set to
yes
, will automatically classify pages tagged as {{Para|class|NA}} depending on the namespace of the page. The default setting isno
. - {{Para|b1}}, {{Para|b2}}, {{Para|b3}}, {{Para|b4}}, {{Para|b5}}, {{Para|b6}} - if the B-class checklist is used, these parameters must be passed through.
= The lowercase parameter syntax =
Add a class in lowercase as the name of a parameter followed by the value "yes". For example, {{Para|future|yes}} would add the {{Class/icon|Future}}
- The name of the class must have an initial capital letter and all following letters in lowercase. In other words, the capitalisation must be of the form Xxxxxx.
- It is not possible to use this method to add a shortcut or alternative alias for a different class, for example "Cur" for Current-class.
If either of these are required, the uppercase parameter syntax must be used (see below).
If {{Para|FQS|yes}} is used, then a value of "no" may be used to switch off that individual class. Thus, on a /class
subpage:
{{Class mask
|topic=physics
|FQS=yes
|portal=no
}}
would support six of the seven additional classes listed above but not support Portal-Class.
= The UPPERCASE parameter syntax =
Add a class in UPPERCASE as the name of a parameter followed by the exact, case-sensitive name of the class as the value of the parameter. For example,
would add SIA-Class and
would add CheeseCake-Class.
You can use this method to add a shortcut or alias for a class, too, as in the case of
|future=yes
|FUT=Future
which would have the effect that defining either {{Para|future}} or {{Para|fut}} (not case sensitive) with a valid value would result in an assessment into Future-Class for that page.
You can add as many aliases for a class as needed, so this would work just as well for SIA-Class,
|SIA=SIA
|SETINDEX=SIA
|SET INDEX ARTICLE=SIA
and would mean that an input of {{Para|sia}}, {{Para|setindex}} or {{Para|set index article}} (again, these are case-insensitive) would each result in an SIA-Class page assessment.
Example
The following code is placed in the banner template,
|QUALITY_SCALE=subpage
|class={{{class|}}}
and on the /class
subpage (for example {{Template link general|WikiProject Zimbabwe|kbd=yes}} uses the subpage Template:WikiProject Zimbabwe/class), the following code is used:
{{Class mask
|topic=Zimbabwe
|FQS=yes
|redirect=yes
}}
In this case all seven of the "extended" quality classes are used, plus the additional Redirect-Class, and because the {{Para|topic}} parameter is set, specific documentation will be displayed on the /class subpage for it.
Subtemplates
- {{Template link general|Class mask/b}} - the mask for B-checklist parameters
- {{Template link general|Class mask/sandbox}} - the template sandbox, used for experimentation
- {{Template link general|Class mask/templatepage}} - the documentation that is displayed on
/class
subpages - {{Template link general|Class mask/templatepage/row}} - used by
/templatepage
- {{Template link general|Class mask/doc}} - the documentation you are reading now
- {{Template link general|Class mask/doc/custom}} - for information on building your own class mask
Instances
- [{{fullurl:Special:WhatLinksHere/Template:Class mask/templatepage|&hidelinks=1&hideredirs=1}} This] shows all /class subpages which use this template.
TemplateData
{{TemplateData header}}
"description": "This template provides the project-specific valid Wikipedia 1.0 assessment scheme classes to Template:WPBannerMeta",
"format": "inline",
"paramOrder": [
"1",
"topic",
"fa",
"fl",
"a",
"ga",
"b",
"c",
"start",
"stub",
"list",
"FQS",
"category",
"disambig",
"draft",
"file",
"portal",
"project",
"template",
"fm",
"redirect",
"forceNA",
"b1",
"b2",
"b3",
"b4",
"b5",
"b6",
"topic1",
"topic2",
"topic3",
"topic4",
"topic5",
"topic6"
],
"params": {
"1": {
"label": "Assessment class",
"description": "Passthrough for {{{class}}} parameter from Template:WPBannerMeta",
"example": "{{{class|}}}",
"type": "content",
"suggestedvalues": [
"{{{class|}}}"
],
"autovalue": "{{{class|}}}",
"required": true
},
"b1": {},
"b2": {},
"b3": {},
"b4": {},
"b5": {},
"b6": {},
"b": {},
"forceNA": {},
"file": {},
"FQS": {},
"category": {},
"portal": {},
"template": {},
"project": {},
"draft": {},
"disambig": {},
"redirect": {},
"fm": {},
"fa": {},
"fl": {},
"a": {},
"ga": {},
"c": {},
"start": {},
"stub": {},
"list": {},
"topic1": {},
"topic2": {},
"topic3": {},
"topic4": {},
"topic5": {},
"topic6": {},
"topic": {}
}
}
{{Sandbox other||
Category:WikiProject templates
Category:Wikipedia metatemplates
}}