Template:vcount
From Homestar Runner Wiki
1
Template that augments the counter parser function so that its output can be part of a sorted table. This template creates both a hidden counter (for correct sorting) and a visible counter for display.
Usage:
{{ vcount | countername }}
where countername is the name of the counter being used. This parameter is required. Place this template in each cell of a given column. You can specify custom increment values for the counter (note that brackets denote optional parameters):
{{ vcount | countername [ | 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). You may also reset up to 6 counters with the {{hresetcount}} template. (Note that brackets denote optional parameters):
{{hresetcount | countername1 [ |countername2 ] [ | countername3 ] [ |countername4 ] [ |countername5 ] [ |countername6 ] }}
Optionally, you may set the initial visible counter value to something other than the default value of 1:
{{hresetcount | countername | vv=25 }}
This resets the visible counter to 25. In addition, you can set the hidden counter value to something other than the default value of 10,000 and count by something other than the default value of 1. (It is recommended to use a value with all nines if counting by a negative value.) :
{{hresetcount | countername | v=9999 | vv=100 | countby=-1 }}
This resets the hidden counter to a value of 9,999 and the first visible value to 100 (once the proper increment of -1 is applied when calling the counter).
Technical Information:
- vcount creates two separate counters, one for the hidden count, another for the visible count. Specifically, the template appends "_visible" to the counter name specified in the first parameter to create the visible counter (e.g. counter1 and counter1_visible).