Template:CountItem
From A KoL Wiki
[edit]
{{CountItem}}
<div class="countItem-{{{2|0}}}-{{{1}}}" style="display:none;"></div>
Adds an invisible counter which can be used to generate sums automatically in a page. Use one of these for each item you want to count in a page.
Usage
- {{CountItem|n|m}}
- The first argument
n
is required, and indicates which the counter that this applies to. Counters are numeric values, starting at 0. - The second argument
m
is optional. Counters are divided into sets, so you can produce distinct sums for different groupings of counters. Counter sets are also numeric values, starting at 0. The default is 0.
- The first argument
- Note that both counters (the
n
values) and sets (them
values) require you use numbers in order, with no gaps. So you cannot use counter (or set) 3 without using counters (sets) 0, 1, and 2 as well. - See {{CountTotal}} for creating the sum of a specific counter, and {{CountTotalTotal}} for summing all counters within a set.