Difference between revisions of "Template:Class mask/doc"

From blackwiki
Jump to navigation Jump to search
(kjhltt)
Line 4: Line 4:
 
This template is designed for use in WikiProject banners, and provides an easy way to construct a bespoke class mask. The temploparameter must be passed to the template as the first unnamed parameter.
 
This template is designed for use in WikiProject banners, and provides an easy way to construct a bespoke class mask. The temploparameter must be passed to the template as the first unnamed parameter.
  
===Implementation in [[Template:WPBannerMeta]]===
+
===Implementation in  
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:
+
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 It can be used in two different ways:
* with {{para|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.
+
* with 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 {{para|QUALITY_SCALE|inline}} and placed directly inside the ''class'' parameter.
+
* with and placed directly inside the ''class'' parameter.
  
 
=== Use on subpages ===
 
=== Use on subpages ===
When used on a /class subpage (e.g. with {{para|QUALITY_SCALE|subpage}}) the template should be called in the following way:
+
When used on a /class subpage the template should be called in the following way:
<pre>{{class mask<noinclude>/templatepage</noinclude>|{{{class|}}}
+
<pre>{{class mask<noinclude>/tnoinclude>|{{{class|}}}
 
  |topic=
 
  |topic=
  |optional parameters
+
  |optiona
 
}}</pre>
 
}}</pre>
 
This allows the [[Template:Class mask/templatepage|/templatepage]] to be displayed which provides useful documentation and category prompts on the subpage.
 
This allows the [[Template:Class mask/templatepage|/templatepage]] to be displayed which provides useful documentation and category prompts on the subpage.
Line 43: Line 43:
 
*{{para|start}}
 
*{{para|start}}
 
*{{para|stub}}
 
*{{para|stub}}
*{{para|list}} – if one or more of these nine is set to <code>no</code>, the class will be switched off. The default is <code>yes</code> regardless of the {{para|FQS}} setting.
+
*{{para|list}} – if one or more of these nine is set to <code>no</code>, the class will be switched off. The default is <code>yes<l - if the B-class checklist is used, these parameters must be passed through.
*{{para|book}}
 
*{{para|fm}}
 
*{{para|redirect}} – if one or more of these three is set to <code>yes</code>, the class will be switched on. The default is <code>no</code> regardless of the {{para|FQS}} setting.
 
* {{para|forceNA}} - if set to <code>yes</code>, will automatically classify pages tagged as {{para|class|NA}} depending on the namespace of the page. The default setting is <code>no</code>.
 
* {{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 ===
 
=== The lowercase parameter syntax ===
Line 112: Line 107:
 
}}
 
}}
 
</pre>
 
</pre>
In this case all six of the "extended" quality classes are used, plus the additional Redirect-class. Because the {{para|topic}} parameter is set, specific documentation will be displayed on the /class subpage.
+
In this case all six of the  
 
 
=== Example 2: inline ===
 
The following code is placed in the banner template:
 
 
 
<pre>
 
|QUALITY_SCALE = inline
 
|class={{class mask |{{{class|}}} |FQS=yes |redirect=yes |fm=yes}}
 
</pre>
 
 
 
Now the extended quality classes are used, plus the additional Redirect and FM classes.
 
 
 
=== Subtemplates ===
 
* [[Template:Class mask/b|/b]] - the mask for B-checklist parameters
 
* [[Template:Class mask/sandbox|/sandbox]] - the template sandbox, used for experimentation
 
* [[Template:Class mask/templatepage|/templatepage]] - the documentation that is displayed on /class subpages
 
** [[Template:Class mask/templatepage/row|/templatepage/row]] - used by /templatepage
 
* [[Template:Class mask/doc|/doc]] - the documentation you are reading now
 
** [[Template:Class mask/doc/custom|/doc/custom]] - for information on building your own class mask
 
 
 
=== Uses ===
 
* [{{fullurl:Special:WhatLinksHere/Template:Class mask/templatepage|&hidelinks=1&hideredirs=1}} This] shows all /class subpages which use this template.
 
 
 
<includeonly>{{Sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:WikiProject templates]]
 
[[Category:Wikipedia metatemplates]]
 
  
 
}}</includeonly>
 
}}</includeonly>

Revision as of 17:22, 8 September 2020