Template:Class mask/doc
![]() | This is a documentation subpage for Template:Class mask. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | This template is used on approximately 337,000 pages, or roughly 2% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
![]() | This template uses Lua: |
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 |QUALITY_CRITERIA=custom
and |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:
<syntaxhighlight lang="wikitext" style="margin-left: 2.5em; max-width: 48em;">
![]() | In order for this documentation to relate specifically to the WikiProject, please define the |topic= parameter. |

![]() | This template is used on approximately 337,000 pages, or roughly 2% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
This page holds the custom class mask for the Template:Class mask. It uses {{class mask}}, a template for constructing class masks according to individual WikiProjects' wishes. The following table shows the output of the mask, with the current parameter definitions, for different inputs and namespaces.
Classification based on class parameter
Input (not case-specific) | Icon | Class | Category | Population |
---|---|---|---|---|
fa | ![]() |
FA | Category:FA-Class articles | 1,228 |
a | ![]() |
A | Category:A-Class articles | 1,202 |
ga | ![]() |
GA | Category:GA-Class articles | 1,257 |
b | ![]() |
B | Category:B-Class articles | 1,263 |
c | ![]() |
C | Category:C-Class articles | 655 |
start | ![]() |
Start | Category:Start-Class articles | 1,268 |
stub | ![]() |
Stub | Category:Stub-Class articles | 1,266 |
fl | ![]() |
FL | Category:FL-Class articles | 1,346 |
list | ![]() |
List | Category:List-Class articles | 1,293 |
na | ![]() |
NA | Category:NA-Class articles | 1,367 |
Classification of redirects
If the WikiProject banner is placed on the talk page of a redirect (in any namespace) and the class parameter is not defined, then the page will automatically be classified as NA-class and placed in Category:NA-Class articles.
Classification based on namespace
In addition, if class is empty, undefined or unrecognized, then the class will be deduced from the namespace of the page when possible.
Namespace | Icon | Class | Category | Population |
---|---|---|---|---|
User talk | ![]() |
NA | Category:NA-Class articles | 1,367 |
File talk | ||||
TimedText talk | ||||
Category talk | ||||
Portal talk | ||||
Template talk | ||||
Module talk | ||||
Project talk | ||||
Draft talk | ||||
Help talk | ||||
MediaWiki talk |
In all other circumstances, articles will be classed as Unassessed and placed in Category:Unassessed-Class articles.
</syntaxhighlight>
The <noinclude>...</noinclude>
tags allow the documentation from {{Class mask/templatepage}} 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
|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 afterCategory: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 asCategory:B-Class mathematics articles
, etc., then set|topic=mathematics
.- if the template uses task forces, the parameters
|topic1=
,|topic2=
,|topic3=
,|topic4=
,|topic5=
and|topic6=
can be used to check for the corresponding categories needed by each.
- if the template uses task forces, the parameters
Optional parameters
- If one or more of these nine is set to
no
, the class will be switched off. Their default isyes
:|fa=
–Featured Article
|fl=
–Featured List
|a=
–A-Class
|ga=
–Good Article
|b=
–B-Class
|c=
–C-Class
|start=
–Start-Class
|stub=
–Stub-Class
|list=
–List-Class
|FQS=
– if set toyes
, 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|FQS=
is absent, setting one or more toyes
will switch on only that class.|category=
–Category-Class
|disambig=
–Disambig-Class
|draft=
–Draft-Class
|file=
–File-Class
|portal=
–Portal-Class
|project=
–Project-Class
|template=
–Template-Class
- If either of these is set to
yes
, that class will be switched on. The default isno
, regardless of the|FQS=
setting:|fm=
–Featured Media
|redirect=
–Redirect-Class
|forceNA=
- if set toyes
, will automatically classify pages tagged as|class=NA
depending on the namespace of the page. The default setting isno
.|b1=
,|b2=
,|b3=
,|b4=
,|b5=
,|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, |future=yes
would add the
Future |
class. This is the simplest way of adding a class but has the following two limitations:
- 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 |FQS=yes
is used, then a value of "no" may be used to switch off that individual class. Thus, on a /class
subpage:
<syntaxhighlight lang="wikitext" style="margin-left: 2.5em; max-width: 48em;">
![]() | Some of the categories required do not currently exist, and need to be created. Please ensure that the categories below are created to avoid redlinks appearing on talk pages.
|

![]() | This template is used on approximately 337,000 pages, or roughly 2% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
This page holds the custom class mask for the Template:Class mask. It uses {{class mask}}, a template for constructing class masks according to individual WikiProjects' wishes. The following table shows the output of the mask, with the current parameter definitions, for different inputs and namespaces.
Classification based on class parameter
Input (not case-specific) | Icon | Class | Category | Population |
---|---|---|---|---|
fa | ![]() |
FA | Category:FA-Class physics articles | 0 |
a | ![]() |
A | Category:A-Class physics articles | 6 |
ga | ![]() |
GA | Category:GA-Class physics articles | 0 |
b | ![]() |
B | Category:B-Class physics articles | 6 |
c | ![]() |
C | Category:C-Class physics articles | 6 |
start | ![]() |
Start | Category:Start-Class physics articles | 6 |
stub | ![]() |
Stub | Category:Stub-Class physics articles | 6 |
fl | ![]() |
FL | Category:FL-Class physics articles | 0 |
list | ![]() |
List | Category:List-Class physics articles | 0 |
na | ![]() |
NA | Category:NA-Class physics articles | 0 |
file / image / img | ![]() |
File | Category:File-Class physics articles | 0 |
draft | ![]() |
Draft | Category:Draft-Class physics articles | 1 |
category / cat / categ | ![]() |
Category | Category:Category-Class physics articles | 0 |
disambig / disamb / disambiguation / dab |
![]() |
Disambig | Category:Disambig-Class physics articles | 0 |
template / temp / templ / tpl | ![]() |
Template | Category:Template-Class physics articles | 0 |
project | ![]() |
Project | Category:Project-Class physics articles | 0 |
Classification of redirects
If the WikiProject banner is placed on the talk page of a redirect (in any namespace) and the class parameter is not defined, then the page will automatically be classified as NA-class and placed in Category:NA-Class physics articles.
Classification based on namespace
In addition, if class is empty, undefined or unrecognized, then the class will be deduced from the namespace of the page when possible.
Namespace | Icon | Class | Category | Population |
---|---|---|---|---|
User talk | ![]() |
NA | Category:NA-Class physics articles | 0 |
Portal talk | ||||
Help talk | ||||
MediaWiki talk | ||||
File talk | ![]() |
File | Category:File-Class physics articles | 0 |
TimedText talk | ||||
Category talk | ![]() |
Category | Category:Category-Class physics articles | 0 |
Template talk | ![]() |
Template | Category:Template-Class physics articles | 0 |
Module talk | ||||
Wikipedia talk | ![]() |
Project | Category:Project-Class physics articles | 0 |
Draft talk | ![]() |
Draft | Category:Draft-Class physics articles | 1 |
In all other circumstances, articles will be classed as Unassessed and placed in Category:Unassessed physics articles.
</syntaxhighlight>
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, <syntaxhighlight lang="wikitext" style="margin-left: 2.5em; max-width: 20em;">|SIA=SIA</syntaxhighlight> would add SIA-Class and <syntaxhighlight lang="wikitext" style="margin-left: 2.5em; max-width: 20em;">|CHEESECAKE=CheeseCake</syntaxhighlight> would add CheeseCake-Class.
You can use this method to add a shortcut or alias for a class, too, as in the case of
<syntaxhighlight lang="wikitext" style="margin-left: 2.5em; max-width: 20em;">
|future=yes
|FUT=Future
</syntaxhighlight>
which would have the effect that defining either |future=
or |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,
<syntaxhighlight lang="wikitext" style="margin-left: 2.5em; max-width: 20em;">
|SIA=SIA
|SETINDEX=SIA
|SET INDEX ARTICLE=SIA
</syntaxhighlight>
and would mean that an input of |sia=
, |setindex=
or |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, <syntaxhighlight lang="wikitext" style="margin-left: 2.5em; max-width: 24em;"> |QUALITY_SCALE=subpage
|class=
</syntaxhighlight>
and on the /class
subpage (for example {{WikiProject Zimbabwe}} uses the subpage Template:WikiProject Zimbabwe/class), the following code is used:
<syntaxhighlight lang="wikitext" style="margin-left: 2.5em; max-width: 48em;">
![]() | Some of the categories required do not currently exist, and need to be created. Please ensure that the categories below are created to avoid redlinks appearing on talk pages. |

![]() | This template is used on approximately 337,000 pages, or roughly 2% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
This page holds the custom class mask for the Template:Class mask. It uses {{class mask}}, a template for constructing class masks according to individual WikiProjects' wishes. The following table shows the output of the mask, with the current parameter definitions, for different inputs and namespaces.
Classification based on class parameter
Classification of redirects
If the WikiProject banner is placed on the talk page of a redirect (in any namespace) and the class parameter is not defined, then the page will automatically be classified as Redirect-class and placed in Category:Redirect-Class Zimbabwe articles.
Classification based on namespace
In addition, if class is empty, undefined or unrecognized, then the class will be deduced from the namespace of the page when possible.
Namespace | Icon | Class | Category | Population |
---|---|---|---|---|
User talk | ![]() |
NA | Category:NA-Class Zimbabwe articles | 0 |
Help talk | ||||
MediaWiki talk | ||||
File talk | ![]() |
File | Category:File-Class Zimbabwe articles | 0 |
TimedText talk | ||||
Category talk | ![]() |
Category | Category:Category-Class Zimbabwe articles | 0 |
Portal talk | ![]() |
Portal | Category:Portal-Class Zimbabwe articles | 0 |
Template talk | ![]() |
Template | Category:Template-Class Zimbabwe articles | 0 |
Module talk | ||||
Wikipedia talk | ![]() |
Project | Category:Project-Class Zimbabwe articles | 0 |
Draft talk | ![]() |
Draft | Category:Draft-Class Zimbabwe articles | 0 |
In all other circumstances, articles will be classed as Unassessed and placed in Category:Unassessed Zimbabwe articles.
</syntaxhighlight>
In this case all seven of the "extended" quality classes are used, plus the additional Redirect-Class, and because the |topic=
parameter is set, specific documentation will be displayed on the /class subpage for it.
Subtemplates
- {{Class mask/b}} - the mask for B-checklist parameters
- {{Class mask/sandbox}} - the template sandbox, used for experimentation
- {{Class mask/templatepage}} - the documentation that is displayed on
/class
subpages- {{Class mask/templatepage/row}} - used by
/templatepage
- {{Class mask/templatepage/row}} - used by
- {{Class mask/doc}} - the documentation you are reading now
- {{Class mask/doc/custom}} - for information on building your own class mask
Instances
- This shows all /class subpages which use this template.
TemplateData
TemplateData for Class mask
This template provides the project-specific valid Wikipedia 1.0 assessment scheme classes to Template:WPBannerMeta
Parameter | Description | Type | Status | |
---|---|---|---|---|
Assessment class | 1 | Passthrough for {{{class}}} parameter from Template:WPBannerMeta
| Content | required |
topic | topic | no description | Unknown | optional |
fa | fa | no description | Unknown | optional |
fl | fl | no description | Unknown | optional |
a | a | no description | Unknown | optional |
ga | ga | no description | Unknown | optional |
b | b | no description | Unknown | optional |
c | c | no description | Unknown | optional |
start | start | no description | Unknown | optional |
stub | stub | no description | Unknown | optional |
list | list | no description | Unknown | optional |
FQS | FQS | no description | Unknown | optional |
category | category | no description | Unknown | optional |
disambig | disambig | no description | Unknown | optional |
draft | draft | no description | Unknown | optional |
file | file | no description | Unknown | optional |
portal | portal | no description | Unknown | optional |
project | project | no description | Unknown | optional |
template | template | no description | Unknown | optional |
fm | fm | no description | Unknown | optional |
redirect | redirect | no description | Unknown | optional |
forceNA | forceNA | no description | Unknown | optional |
b1 | b1 | no description | Unknown | optional |
b2 | b2 | no description | Unknown | optional |
b3 | b3 | no description | Unknown | optional |
b4 | b4 | no description | Unknown | optional |
b5 | b5 | no description | Unknown | optional |
b6 | b6 | no description | Unknown | optional |
topic1 | topic1 | no description | Unknown | optional |
topic2 | topic2 | no description | Unknown | optional |
topic3 | topic3 | no description | Unknown | optional |
topic4 | topic4 | no description | Unknown | optional |
topic5 | topic5 | no description | Unknown | optional |
topic6 | topic6 | no description | Unknown | optional |