Template:Counter/2: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<includeonly>{{#vardefine:{{{counter name|counter}}}|{{#expr:{{#var:{{{counter name|counter}}}}}+1}}}}</includeonly><noinclude>{{Documentation |content=Secondary template that adds +1 to the value of the local variable "counter2" every time it is called. == Usage == If you need multiple counters that count at the same time you can use {{code|<nowiki>{{counter/2}}</nowiki>}} together with the {{code|<nowiki>{{counter}}</nowiki>}} template. {{code|<nowiki>{{counter/2}}</...") |
(did not work) Tag: Undo |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:{{{counter name| | <includeonly>{{#vardefine:{{{counter name|counter2}}}|{{#expr:{{#var:{{{counter name|counter2}}}}}+1}}}}</includeonly><noinclude>{{Documentation | ||
|content=Secondary template that adds +1 to the value of the local variable "counter2" every time it is called. | |content=Secondary template that adds +1 to the value of the local variable "counter2" every time it is called. | ||
Latest revision as of 08:44, 6 February 2024
Template documentation
Secondary template that adds +1 to the value of the local variable "counter2" every time it is called.
Usage
If you need multiple counters that count at the same time you can use {{counter/2}}
together with the {{counter}}
template.
{{counter/2}}
should be defined with {{#vardefine:counter2|0}}
. See Template:Counter for documentation.