Template:CountItem

From A KoL Wiki
Revision as of 15:10, 9 July 2016 by imported>Fig bucket (Created page with "<includeonly><div class="countItem-{{{2|0}}}-{{{1}}}" style="display:none;"></div></includeonly><noinclude> {{Code2}} Adds an invisible counter which can be used to generate...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
<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.
  • Note that both counters (the n values) and sets (the m 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.