সাঁচ:Class mask¬
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:WPBannerMetaThe 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:
Use on subpagesWhen used on a /class subpage (e.g. with {{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.
Neither of the above are required for the Inline useWhen used "inline" (e.g. with {{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. Optional parameters
The lowercase parameter syntaxAdd 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 {{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. The UPPERCASE parameter syntaxAdd 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. Example 1: subpageThe 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 Example 2: inlineThe 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. Subtemplates
Uses
|
Portal di Ensiklopedia Dunia