|
|
Line 36: |
Line 36: |
|
| |
|
| ===Indentation=== | | ===Indentation=== |
| <nowiki>{{catWeight|0|Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}}</nowiki> | | <nowiki>{{catWeight|0|0|'''No''' indentation or weight.}}</nowiki> |
| <nowiki>{{catWeight|abc|Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}}</nowiki>
| | {{catWeight|0|0|'''No''' indentation or weight.}} |
| <nowiki>{{catWeight||Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}}</nowiki>
| |
| {{catWeight|0|Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}}
| |
|
| |
|
| <nowiki>{{catWeight|1|Another note|'''One''' indentation, just like <tt>catWeight2</tt>.}}</nowiki> | | <nowiki>{{catWeight|1|1|'''One''' indentation and weight.}}</nowiki> |
| {{catWeight|1|Another note|'''One''' indentation, just like <tt>catWeight2</tt>.}} | | {{catWeight|1|1|'''One''' indentation and weight.}} |
|
| |
|
| <nowiki>{{catWeight|2|Important|Level '''two''' indentation!}}</nowiki> | | <nowiki>{{catWeight|2|2|Level '''two''' indentation and weight!}}</nowiki> |
| {{catWeight|2|Important|Level '''two''' indentation!}} | | {{catWeight|2|2|Level '''two''' indentation and weight!}} |
| | |
| <nowiki>{{catWeight|6|Very important|Maximum indentation level of '''six'''! "Very important" is ...}}</nowiki>
| |
| {{catWeight|6|Very important|Maximum indentation level of '''six'''! "Very important" is '''not''' word-wrapped.}}
| |
|
| |
|
| | <nowiki>{{catWeight|6|6|Maximum indentation level of '''six''', same weight!}}</nowiki> |
| | {{catWeight|6|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. |
Revision as of 12:45, 2 May 2009
Documentation for this template
This template creates an eye-catcher bar that can be indented up to 6 times via parameter value, letting the user better customize his "Note"s. The code is backwards compatible, letting the user keep on using the old 2 parameter version as well.
New
|
Subtle one-pixel border added, padding improved, <weight> is not word-wrapped.
|
Alternative names
- {{catWeight|<weight>|<text>}}
- {{CatWeight|<weight>|<text>}} - alternate spelling of template
- {{catWeight|<#>|<weight>|<text>}}
- {{CatWeight|<#>|<weight>|<text>}} - alternate spelling of template
Syntax
The template can have 2 or 3 parameters:
- {{catWeight|<weight>|<text>}} - Default mode, no indentation.
- {{catWeight|<#>|<weight>|<text>}} - Define indentation via <#> parameter.
<#> = Number 0 (min) to 6 (max), defines indentation level.
<weight> = The category weight denominator (not word-wrapped), range:
1 for "+" to 6 for "***"
1-5 for "+ to **+"
1-6 for "+ to ***"
<text> = The descriptive text for that weight level.
Note
|
Only the <#> values 1 to 6 are actually checked, any other values (e.g. 0 or abc) yield no indentation at all, and are treated the same as {{eyecatch|info|text}}!
|
Examples
The Weights
Category Weight
|
+
|
Weight + means this and that.
|
Category Weight
|
*
|
Weight * means this and that.
|
Category Weight
|
*+
|
Weight *+ means this and that.
|
Category Weight
|
**
|
Weight ** means this and that.
|
Category Weight
|
**+
|
Weight **+ means this and that.
|
Category Weight
|
***
|
Weight *** means this and that.
|
Category Weight
|
+ to **+
|
Weight + to **+ means this and that.
|
Category Weight
|
+ to ***
|
Weight + to *** means this and that.
|
Indentation
{{catWeight|0|0|'''No''' indentation or weight.}}
Category Weight
|
|
No indentation or weight.
|
{{catWeight|1|1|'''One''' indentation and weight.}}
Category Weight
|
+
|
One indentation and weight.
|
{{catWeight|2|2|Level '''two''' indentation and weight!}}
Category Weight
|
*
|
Level two indentation and weight!
|
{{catWeight|6|6|Maximum indentation level of '''six''', same weight!}}
Category Weight
|
***
|
Maximum indentation level of six, same weight!
|
Test the Code
Should more code testing be required see the Template:CatWeight/Test Code page.