Template:vcount

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(fix redirect)
(adding sort info link)
Line 1: Line 1:
{{hcount|{{{1}}}}}{{#count:{{{1}}}_visible|{{{2|1}}}|{{{3|}}}}}<noinclude>
{{hcount|{{{1}}}}}{{#count:{{{1}}}_visible|{{{2|1}}}|{{{3|}}}}}<noinclude>
----
----
-
Template that augments the [[HRWiki:Counter|counter parser function]] so that its output can be part of a sorted table.
+
Template that augments the [[HRWiki:Counter|counter parser function]] so that its output can be part of a [[HRW:SORT|sorted table]].
'''Usage:'''
'''Usage:'''

Revision as of 14:07, 2 May 2007

11


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

Usage:

{{ vcount | 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):

{{ vcount | 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 {{hresetcount}} template:

{{hresetcount | countername}}

This ensures that the table is sorted correctly (in proper numerical order). For more information on using {{hresetcount}} 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