Template:vcount

From Homestar Runner Wiki

Jump to: navigation, search

11


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. The usage of this template is similar to that of {{hcount}} although the extended functionality of #count is also available where you can specify custom increment values for the visible counter (and 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. (However, this is not recommended and in most cases, unnecessary.) :

{{hresetcount | countername | v=100000 | vv=10 }}

This resets the hidden counter to a value of 100,000 and the first visible value to 10.

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).

[edit] See Also

Personal tools