Examples/Module: dplvar (example 2)

Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

edit

This invokes the {{dplvarUpdate}} template, which initially sets a variable called varName and assigns it the value My Value using:{{#dplvar:set|varName|My Value}}. It later evaluates whether the first parameter is empty or not and if empty returns n/a. If not empty, it gives the revised value My Value2.

{{dplvarUpdate|true}}

Result

edit
  • The initial value of {{#dplvar:varName}} is: My Value
  • If the first param is not empty {{#dplvar:varName}} is: My Value2