Template:vcount

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(fix spacing)
(finishing doc)
Line 4: Line 4:
'''Usage:'''
'''Usage:'''
-
Usage:
 
:<code><nowiki>{{ </nowiki> hcount | ''countername'' }}</code>
:<code><nowiki>{{ </nowiki> hcount | ''countername'' }}</code>
-
where ''countername'' is the name of the counter being used.  Place this template in each cell of a given column.  The usage of this tempalte is similar to that of {{tl|hcount}} although the extended functionality of '''#count''' is also available:
+
where ''countername'' is the name of the counter being used.  Place this template in each cell of a given column.  The usage of this tempalte is similar to that of {{tl|hcount}} although the extended functionality of '''#count''' is also available (''and note that brackets denote optional parameters''):
-
'''Technical Information:'''
+
:<code><nowiki>{{ </nowiki> hcount | ''countername'' [ | ''initial value'' ] [ | ''increment'' ] }}</code>
 +
'''IMPORTANT:'''
 +
 +
Please be sure to first reset the counter before making any calls to this template in order to a sufficiently high enough by using the {{tl|hreset}} template:
 +
:<code><nowiki>{{</nowiki>[[Template:hreset|hreset]] | ''countername''}}</code>
 +
This ensures that the table is sorted correctly (in proper numerical order). For more information on using {{tl|hreset}} please read the documentation for {{tl|hcount}}.
 +
 +
'''Technical Information:'''
 +
* '''vcount''' creates two separate counters, one for the hidden count, another for the visible count (i.e. ''counter1'' and ''counter1_visible'').  In other words, the template appends "_visible" to the counter name specified in the first parameter.
 +
== See Also ==
 +
*[[HRWiki:Counter|Counter function usage]]
 +
*{{tl|hcount}}
[[Category:Formatting Templates|{{PAGENAME}}]]
[[Category:Formatting Templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Revision as of 17:45, 28 April 2007

11


Template that augments the counter parser function so that its output can be part of a sorted table.

Usage:

{{ hcount | countername }}

where countername is the name of the counter being used. Place this template in each cell of a given column. The usage of this tempalte is similar to that of {{hcount}} although the extended functionality of #count is also available (and note that brackets denote optional parameters):

{{ hcount | countername [ | initial value ] [ | increment ] }}

IMPORTANT:

Please be sure to first reset the counter before making any calls to this template in order to a sufficiently high enough by using the {{hreset}} template:

{{hreset | countername}}

This ensures that the table is sorted correctly (in proper numerical order). For more information on using {{hreset}} please read the documentation for {{hcount}}.

Technical Information:

  • vcount creates two separate counters, one for the hidden count, another for the visible count (i.e. counter1 and counter1_visible). In other words, the template appends "_visible" to the counter name specified in the first parameter.

See Also

Personal tools