From Wikipedia, the free encyclopedia
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.
This is a documentation subpage for ଛାଞ୍ଚ:Class mask. It may contain usage information, categories and other content that is not part of the original ଛାଞ୍ଚ page. |
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:
|QUALITY_SCALE=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.|QUALITY_SCALE=inline
and placed directly inside the class parameter. However this method is not suitable for projects which use either of the following:When used on a /class subpage (e.g. with |QUALITY_SCALE=subpage
) the template should be called in the following way:
{{class mask<noinclude>/templatepage</noinclude>|{{{class|}}} |topic= |optional parameters }}
This allows the /templatepage to be displayed which provides useful documentation and category prompts on the subpage.
|topic=mathematics
.
Neither of the above are required for the |QUALITY_SCALE=inline
version.
When used "inline" (e.g. with |QUALITY_SCALE=inline
), the call to /templatepage and the topic parameters are not required, and the template should be called in the following way:
{{class mask |{{{class|}}} |optional parameters }}
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.
|class=NA
depending on the namespace of the page. The default setting is "no".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).
If |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<noinclude>/templatepage</noinclude>|{{{class|}}} |topic=physics |FQS=yes |portal=no }}
would support all of the six additional classes listed above except Portal-class.
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 |B+ = Bplus
would have the effect that an input of either B+ or Bplus would result in Bplus-class.
The following code is placed in the banner template:
|QUALITY_SCALE=subpage |class={{{class|}}}
and on the /class subpage (for example Template:WikiProject Zimbabwe uses the subpage Template:WikiProject Zimbabwe/class), the following code is used:
{{class mask<noinclude>/templatepage</noinclude>|{{{class|}}} |topic=Zimbabwe |FQS=yes |redirect=yes }}
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.
The following code is placed in the banner template:
|QUALITY_SCALE=inline |class={{class mask |{{{class|}}} |category=yes }}
Now the standard quality classes are used, plus the additional Category-class.
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.