Jump to content

Examples/Module: dplvar (example 2)

From DynamicPageList3 Manual
Revision as of 15:48, 31 August 2025 by FrozenPlum (talk | contribs) (Added example of iterative var use (using parser functions to conditionally reassign the value of a #dplvar).)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 source]

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 source]
  • The initial value of {{#dplvar:varName}} is: My Value
  • If the first param is not empty {{#dplvar:varName}} is: My Value2
Cookies help us deliver our services. By using our services, you agree to our use of cookies.