Template:CountTotal: Difference between revisions

From A KoL Wiki
imported>Fig bucket
m too much "
imported>Fig bucket
m revise this too
 
Line 1: Line 1:
<includeonly><span class="countTotal-{{{2|0}}}-{{{1}}}"></span></includeonly><noinclude>
<includeonly><span class="counttotal countable-{{{1|0}}} {{#if:{{{2|}}}|countable-{{{2}}}}} {{#if:{{{3|}}}|countable-{{{3}}} {{#if:{{{4|}}}|countable-{{{4}}} {{#if:{{{5|}}}|countable-{{{5}}} {{#if:{{{6|}}}|countable-{{{6}}} {{#if:{{{7|}}}|countable-{{{7}}} {{#if:{{{8|}}}|countable-{{{8}}} {{#if:{{{9|}}}|countable-{{{9}}} {{#if:{{{10|}}}|countable-{{{10}}} {{#if:{{{11|}}}|countable-{{{11}}} {{#if:{{{12|}}}|countable-{{{12}}} {{#if:{{{13|}}}|countable-{{{13}}} {{#if:{{{14|}}}|countable-{{{14}}} {{#if:{{{15|}}}|countable-{{{15}}} {{#if:{{{16|}}}|countable-{{{16}}} {{#if:{{{17|}}}|countable-{{{17}}}}}"></span></includeonly><noinclude>
{{Code2}}
{{Code2}}


Shows the sum of counted items.
Shows the sum of countable items within one or more groups.


==Usage==
==Usage==
*<nowiki>{{CountTotal|n|m}}</nowiki>
*<nowiki>{{CountTotal|group1|group2|...}}</nowiki>
* Shows the sum of counter <code>n</code>, within counting set <code>m</code>.  The latter is optional and defaults to 0.
* Shows the sum of items in each of the given countable groups.  The default group is "0", and currently a maximum of 17 groups can be specified.
* Assumes at least one counted item exists (no counts of 0).
* See {{tl|CountItem}} for specifying countable items.
* For summing all counters in a counting set use {{tl|CountTotalTotal}}.
* See {{tl|CountItem}} for counter usage.


[[Category:Utility Templates|{{PAGENAME}}]]
[[Category:Utility Templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Latest revision as of 17:22, 10 July 2016

<span class="counttotal countable-{{{1|0}}} {{#if:{{{2|}}}|countable-{{{2}}}}} {{#if:{{{3|}}}|countable-{{{3}}} {{#if:{{{4|}}}|countable-{{{4}}} {{#if:{{{5|}}}|countable-{{{5}}} {{#if:{{{6|}}}|countable-{{{6}}} {{#if:{{{7|}}}|countable-{{{7}}} {{#if:{{{8|}}}|countable-{{{8}}} {{#if:{{{9|}}}|countable-{{{9}}} {{#if:{{{10|}}}|countable-{{{10}}} {{#if:{{{11|}}}|countable-{{{11}}} {{#if:{{{12|}}}|countable-{{{12}}} {{#if:{{{13|}}}|countable-{{{13}}} {{#if:{{{14|}}}|countable-{{{14}}} {{#if:{{{15|}}}|countable-{{{15}}} {{#if:{{{16|}}}|countable-{{{16}}} {{#if:{{{17|}}}|countable-{{{17}}}}}"></span>

Shows the sum of countable items within one or more groups.

Usage

  • {{CountTotal|group1|group2|...}}
  • Shows the sum of items in each of the given countable groups. The default group is "0", and currently a maximum of 17 groups can be specified.
  • See {{CountItem}} for specifying countable items.