Template:Class mask/sandbox/doc

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 Template:WPBannerMeta
The template provides the default class masks for WikiProject's quality scales, and is also used by the majority of projects which use a custom class mask. It can be used in two different ways:
 * with subpage and placed on the /class subpage of the WikiProject's banner template. In this case, specific guidance on how the template works with the chosen parameters is displayed on this page.
 * with inline and placed directly inside the class parameter. However this method is not suitable for projects which use either of the following:

Use on subpages
When used on a /class subpage (e.g. with subpage) the template should be called in the following way: This allows the /templatepage to be displayed which provides useful documentation and category prompts on the subpage. Neither of the above are required for the inline version.
 * the topic parameter defines the main naming scheme of the assessment categories used by the project 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 mathematics.
 * if the template uses taskforces, parameters topic1, topic2, topic3, topic4 and topic5 can be used to check for the necessary categories.

Inline use
When used "inline" (e.g. with inline), the call to /templatepage and the topic parameters are not required, and the template should be called in the following way: Bear in mind that if the banner uses any hooks (e.g. the taskforce hook), you will need to set the options each time class is used. Therefore the subpage method may be more useful in these cases.

Optional parameters

 * FQS - if set to "yes", switches on the following six additional classes. Individual classes may then be switched off by setting their respective lowercase parameters (see below) to "no".
 * Category
 * Disambig
 * Image
 * Portal
 * Template
 * Project
 * forceNA - if set to "yes", will automatically classify pages tagged as NA depending on the namespace of the page. The default setting is "no".
 * 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 |redirect=yes would add the Redirect-class. This is the simplest way of adding a class but has the following two limitations: If either of these are required, the upperclass parameter syntax must be used (see below).
 * 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 yes is used, then a value of "no" may be used to switch off that individual class. Thus, on a /class subpage: would support all of the six additional classes listed above except Portal-class.

The UPPERCASE parameter syntax
Add a class in uppercase as the name of a parameter followed by the exact name of the class (including the required case) as the value of the parameter. For example |SL=SL would add SL-class and |CHEESECAKE=CheeseCake would add CheeseCake-class.

You can use this method to add a shortcut or alias for a class. For example |bplus = yes would have the effect that an input of either B+ or Bplus would result in Bplus-class.
 * B+ = Bplus

Example 1: subpage
The following code is placed in the banner template: |class= and on the /class subpage (for example Template:WikiProject Zimbabwe uses the subpage Template:WikiProject Zimbabwe/class), the following code is used:
 * QUALITY_SCALE=subpage

In this case all six of the "extended" quality classes are used, plus the additional Redirect-class. Because the topic parameter is set, specific documentation will be displayed on the /class subpage.

Example 2: inline
The following code is placed in the banner template: |class= Now the standard quality classes are used, plus the additional Category-class.
 * QUALITY_SCALE=inline

Subtemplates

 * /b - the mask for B-checklist parameters
 * /sandbox - the template sandbox, used for experimentation
 * /templatepage - the documentation that is displayed on /class subpages
 * /templatepage/row - used by /templatepage
 * /doc - the documentation you are reading now
 * /doc/custom - for information on building your own class mask

Uses

 * [ This] shows all /class subpages which use this template.