Template:CatWeight/doc: Difference between revisions

m
no edit summary
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{TOCright}}
{{TOCright}}
==Documentation for this template==
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|Intentation up to 6 levels, colours, and weight ranges.}}
{{eyecatch|1|Features|Indentation of up to 6 levels, colours, and weight ranges.}}
 
 
==Alternative names==
* <tt><nowiki>{{catWeight|<colour>|<weight>|<text>}}</nowiki></tt>
* <tt><nowiki>{{CatWeight|<colour>|<weight>|<text>}}</nowiki></tt>  - alternate spelling of template
* <tt><nowiki>{{catWeight|<#>|<colour>|<weight>|<text>}}</nowiki></tt> 
* <tt><nowiki>{{CatWeight|<#>|<colour>|<weight>|<text>}}</nowiki></tt> - alternate spelling of template
 


==Syntax==
==Syntax==
The template can have '''3''' or '''4 parameters''':
The template can have '''3''' or '''4 parameters''':
#'''<tt><nowiki>{{catWeight|<colour>|<weight>|<text>}}</nowiki></tt>''' - Default mode, no indentation.
#{{m|catWeight|<colour>|<weight>|<text>}} - Default mode, no indentation.
#'''<tt><nowiki>{{catWeight|<#>|<colour>|<weight>|<text>}}</nowiki></tt>''' - Define indentation via <#> parameter.
#{{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.
{{eyecatch|1|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 <tt><nowiki>{{eyecatch|info|text}}</nowiki></tt>!}}
 
  '''<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.
1,633

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.