Template:+=/doc

This is the current revision of this page, as edited by Alex (talk | contribs) at 01:39, 12 October 2024 (Created page with "{{Documentation}} The '''+=''' template is used to calculate running totals. ==Usage== <pre> {{+= |1 = The variable to add to |2 = A variable name or number |echo = Echo the 1 or 2 param }} </pre> ==1== (Required) The name of the variable you wish to add something to. ==2== (Optional) The name of a variable to add to the first, or a number. Defaults to 1. ==echo== (Optional) Echoes the <nowiki>{{{1}}}</nowiki> (<code>echo=1</code>) or <nowiki>{{{2}}}</nowiki> (<code>e..."). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is a documentation subpage for Template:+=.
It contains usage information, categories, and other content that is not part of the original template page.

The += template is used to calculate running totals.

Usage

{{+=
|1 = The variable to add to
|2 = A variable name or number
|echo = Echo the 1 or 2 param
}}

1

(Required) The name of the variable you wish to add something to.

2

(Optional) The name of a variable to add to the first, or a number. Defaults to 1.

echo

(Optional) Echoes the {{{1}}} (echo=1) or {{{2}}} (echo=2) params.


Template data

Show/hide template's data

The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date.

The += template is used to calculate running totals.

Template parameters

ParameterDescriptionTypeStatus
11

Variable name

Example
The name of the variable to add to
Stringrequired
Addition2

The name of a variable to add, or a number. Defaults to 1.

Stringoptional
Echoecho

Echoes the first or second parameter. Example: echo=1

Stringoptional