1,633
edits
m (→The Weights) |
mNo edit summary |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{TOCright}} | {{TOCright}} | ||
This template creates an ''category weight bar'' that can be indented up to six times via parameter value. It can also be colour coded, a weight can be defined, and you can add a message describing the weight choice. | This template creates an ''category weight bar'' that can be indented up to six times via parameter value. It can also be colour coded, a weight can be defined, and you can add a message describing the weight choice. | ||
{{eyecatch|1|Features| | {{eyecatch|1|Features|Indentation of up to 6 levels, colours, and weight ranges.}} | ||
==Syntax== | ==Syntax== | ||
The template can have '''3''' or '''4 parameters''': | The template can have '''3''' or '''4 parameters''': | ||
# | #{{m|catWeight|<colour>|<weight>|<text>}} - Default mode, no indentation. | ||
# | #{{m|catWeight|<#>|<colour>|<weight>|<text>}} - Define indentation via <#> parameter. | ||
'''<#>''' = Number '''0''' (min) to '''6''' (max), defines indentation level. | '''<#>''' = Number '''0''' (min) to '''6''' (max), defines indentation level. | ||
Line 24: | Line 14: | ||
'''amount''' = green-ish... use to match <nowiki>{{catWeightInfo|amount}}</nowiki> | '''amount''' = green-ish... use to match <nowiki>{{catWeightInfo|amount}}</nowiki> | ||
'''misc''' = purple-ish... (fun, testing), the '''default''' colour! | '''misc''' = purple-ish... (fun, testing), the '''default''' colour! | ||
For the most current list of available <colour>s, see [[Template:CatWcolBackground|CatWcolBackground]] | |||
or [[Template:CatWcolFrame|CatWcolFrame]] template. | |||
'''<weight>''' = The category weight denominator (not word-wrapped), range: | '''<weight>''' = The category weight denominator (not word-wrapped), range: | ||
Line 29: | Line 21: | ||
'''1-5''' for "+ to **+" | '''1-5''' for "+ to **+" | ||
'''1-6''' for "+ to ***" | '''1-6''' for "+ to ***" | ||
For a complete list of available <weight>s (and ranges), see the '''[[Template:CatWweight|CatWweight]]''' template. | |||
'''<text>''' = The descriptive text for that weight level. | '''<text>''' = The descriptive text for that weight level. | ||
'''<weight>''' = The category weight denominator (not word-wrapped), range: | |||
'''<w>''' '''1''' for "+" to '''6''' for "***" | |||
'''1-5''' for "+ to **+" | |||
'''1-6''' for "+ to ***" | |||
==Examples== | ==Examples== | ||
Line 58: | Line 54: | ||
<nowiki>{{catWeight|6|misc|6|Maximum indentation level of '''six''', same weight!}}</nowiki> | <nowiki>{{catWeight|6|misc|6|Maximum indentation level of '''six''', same weight!}}</nowiki> | ||
{{catWeight|6|misc|6|Maximum indentation level of '''six''', same weight!}} | {{catWeight|6|misc|6|Maximum indentation level of '''six''', same weight!}} | ||
==Test the Code== | ==Test the Code== | ||
Should more code testing be required see the [[Template:CatWeight/Test Code]] page. | Should more code testing be required see the [[Template:CatWeight/Test Code]] page. |
edits