Template:CountItem: Difference between revisions
From A KoL Wiki
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..." |
imported>Fig bucket m revise this |
||
Line 1: | Line 1: | ||
<includeonly><div class=" | <includeonly><div class="countable countable-{{{1|0}}} {{#if:{{{2|}}}|countable-{{{2}}}}} {{#if:{{{3|}}}|countable-{{{3}}}}}" style="display:none;"></div></includeonly><noinclude> | ||
{{Code2}} | {{Code2}} | ||
Line 5: | Line 5: | ||
==Usage== | ==Usage== | ||
*<nowiki>{{CountItem| | *<nowiki>{{CountItem|group1|group2|group3}}</nowiki> | ||
** | ** Countable things are organized by groups. Group names are lower-case, alphanumeric values. An item can be in up to 3 groups; if no group is specified the default group is "0". | ||
* See {{tl|CountTotal}} for creating the sum of items in a specific group (or set of groups). | |||
* See {{tl|CountTotal}} for creating the sum of a specific | |||
[[Category:Utility Templates|{{PAGENAME}}]] | [[Category:Utility Templates|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> |
Latest revision as of 17:21, 10 July 2016
[edit]
{{CountItem}}
<div class="countable countable-{{{1|0}}} {{#if:{{{2|}}}|countable-{{{2}}}}} {{#if:{{{3|}}}|countable-{{{3}}}}}" 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|group1|group2|group3}}
- Countable things are organized by groups. Group names are lower-case, alphanumeric values. An item can be in up to 3 groups; if no group is specified the default group is "0".
- See {{CountTotal}} for creating the sum of items in a specific group (or set of groups).