Dplvar: Difference between revisions
imported>FrozenPlum (Update with examples that can be mucked with and saved in user sandbox) |
imported>FrozenPlum m (→Example 2) |
||
Line 39:
{{#lsth:Examples/Module: dplvar (example_2)|Example}}
{{ViewTest|Examples|Module: dplvar (example 2)}}
'''Part 1 Result:'''<!--
-->{{#lsth:Examples/Module: dplvar (example 2)|Result}}
[[Category:Other Modules]]
|
Revision as of 00:34, 11 April 2023
|
Manual | dplvar |
Syntax
Sets one symbolic variable name and assign a value:
{{#dplvar:set|varname|valueofvar}}
Sets multiple symbolic variable names and assigns values to them (one after the other):
{{#dplvar:set|name1|value1|name2|value2|..|..}}
Assigns a value only if the variable is empty / has not been used so far:
{{#dplvar:default|name|value}}
Returns the current value of the variable:
{{#dplvar:name}}
Example 1
Part 1:
{{#lsth:Examples/Module: dplvar (example 1)|Part 1}}
Part 1 Result:
{{#lsth:Examples/Module: dplvar (example 1)|Part 1 Result}}
Part 2:
{{#lsth:Examples/Module: dplvar (example 1)|Part 2}}
Page Template:ViewTest/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
Part 2 Result: {{#lsth:Examples/Module: dplvar (example 1)|Part 2 Result}}
Example 2
{{#lsth:Examples/Module: dplvar (example_2)|Example}}
Page Template:ViewTest/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
Part 1 Result:{{#lsth:Examples/Module: dplvar (example 2)|Result}}