Difference between revisions of "Template:Invocations"

From QBWiki
Jump to navigation Jump to search
m
m
Line 2: Line 2:
 
{{Template doc|
 
{{Template doc|
 
A simple counter that can be used to track the number of times a particular template has been invoked ''if'' included exactly once. Emits a value that will be consistent for a given invocation, meaning it can be used to define invocation-specific variables.
 
A simple counter that can be used to track the number of times a particular template has been invoked ''if'' included exactly once. Emits a value that will be consistent for a given invocation, meaning it can be used to define invocation-specific variables.
 +
 +
This '''only works when substituted'''.
  
 
<pre>
 
<pre>
 
{{Invocations}} -> {{Invocations}} -> {{Invocations}} ({{#var:Template:Invocations_invocations}}, {{#var:invocations}})
 
{{Invocations}} -> {{Invocations}} -> {{Invocations}} ({{#var:Template:Invocations_invocations}}, {{#var:invocations}})
 +
 +
{{Invocations/test}} -> {{Invocations/test}}
 
</pre>
 
</pre>
{{Invocations}} -> {{Invocations}} -> {{Invocations}} ({{#var:Template:Invocations_invocations}}, {{#var:invocations}})
+
{{Invocations/test}} -> {{Invocations/test}} ({{#var:Template:Invocations/test_invocations}}, {{#var:invocations}})
 
}}</noinclude>
 
}}</noinclude>

Revision as of 17:59, 20 December 2025

Template documentation

A simple counter that can be used to track the number of times a particular template has been invoked if included exactly once. Emits a value that will be consistent for a given invocation, meaning it can be used to define invocation-specific variables.

This only works when substituted.

{{Invocations}} -> {{Invocations}} -> {{Invocations}} ({{#var:Template:Invocations_invocations}}, {{#var:invocations}})

{{Invocations/test}} -> {{Invocations/test}}

1 -> 2 (, 2)