The decr tag accepts as its first parameter a variable and decreases the value contained within the variable by the value contained within the second optional parameter. If the second parameter is not provided, a value of 1 is assumed.
<cms:set my_value='11' /> <cms:show my_value />
In the snippet above, value of variable my_value is outputted as 11.
<cms:decr my_value '2' /> <cms:show my_value />
The value of variable my_value now becomes 9.
<cms:decr my_value /> <cms:show my_value />
The value of variable my_value now becomes 8.
Expects a maximum of two parameters.
The first parameter has to be a variable. The second parameter is optional and its value is used to decrease the value of the variable passed as the first parameter. A default value of 1 is assumed if the second parameter is not specified.
This tag is a self-closing one and does not set any variables of its own.