Template:hcount

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(updating doc)
m (fix doc, add link to vcount)
Line 1: Line 1:
<span style="display:none">{{#count:{{{1}}}}}</span><noinclude>
<span style="display:none">{{#count:{{{1}}}}}</span><noinclude>
This template is for adding a hidden count meant for use in a sortable table.
This template is for adding a hidden count meant for use in a sortable table.
-
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.   
where ''countername'' is the name of the counter being used.  Place this template in each cell of a given column.   
Line 17: Line 18:
====See Also====
====See Also====
*[[HRWiki:Counter|Counter function usage]]
*[[HRWiki:Counter|Counter function usage]]
 +
*{{tl|vcount}}
[[Category:Formatting Templates|{{PAGENAME}}]]
[[Category:Formatting Templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Revision as of 17:40, 28 April 2007

1 This template is for adding a hidden count meant for use in a sortable table.

Usage:

{{ hcount | countername }}

where countername is the name of the counter being used. Place this template in each cell of a given column.

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). You may also reset up to 5 counters with the {{hreset}} template. (Note that brackets denote optional parameters):

{{hreset | countername1 [ |countername2 ] [ | countername3 ] [ |countername4 ] [ |countername5 ] }}

Optionally, you may set the initial value to something other than the default value of 10,000. (However, this is not recommended and in most cases, unnecessary):

{{hreset | countername | v=100000 }}

This resets the counter to a value of 100,000.

See Also

Personal tools