Examples/Module: dplvar (example 2)

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

Example

The first line's statements set the variables initially as: a to x, b to y, and c to <!--empty-->; then the following variables also have a default set: a to aaaa, c to cccc, and d to dddd.

The last four lines display the value of each corresponding variable in a bulleted list format.

{{#dplvar:set|a|x|b|y|c|<!--empty-->}} {{#dplvar:default|a|aaaa}} {{#dplvar:default|c|cccc}} {{#dplvar:default|d|dddd}}
* a: {{#dplvar:a}}
* b: {{#dplvar:b}}
* c: {{#dplvar:c}}
* d: {{#dplvar:d}}

Result

{{#dplvar:set|a|x|b|y|c|}} {{#dplvar:default|a|aaaa}} {{#dplvar:default|c|cccc}} {{#dplvar:default|d|dddd}}

  • a: {{#dplvar:a}}
  • b: {{#dplvar:b}}
  • c: {{#dplvar:c}}
  • d: {{#dplvar:d}}


Notes:

  • Variable "c" was set to "cccc" because although it was already set, its note is equivalent to an empty value.
  • Variable "d" was set to "dddd" because it was not already set.