Dplvar: Difference between revisions

Update with examples that can be mucked with and saved in user sandbox
imported>FrozenPlum
m (Prior issue requiring {{purgenote}} seems to have resolved, remove it)
imported>FrozenPlum
(Update with examples that can be mucked with and saved in user sandbox)
Line 23:
{{note|The variables can be set and retrieved from an article page or from templates used in that article.}}
 
==Example 1==
'''ResultPart 1:'''
<pre>
{{#lsth:Examples/Module: dplvar (example 1)|Part 1}}
{{#dplvar:set|a|x|b|y|c|<!--empty-->}} {{#dplvar:default|a|aaaa}} {{#dplvar:default|c|cccc}} {{#dplvar:default|d|dddd}}
'''Part 1 Result:'''
</pre>
{{#lsth:Examples/Module: dplvar (example 1)|Part 1 Result}}
{{#dplvar:set|a|x|b|y|c|<!--empty-->}} {{#dplvar:default|a|aaaa}} {{#dplvar:default|c|cccc}} {{#dplvar:default|d|dddd}}
<br>
'''Result:'''
'''NotesPart 2:'''
* a={{#dplvar:a}}
{{#lsth:Examples/Module: dplvar (example 1)|Part 2}}
* b={{#dplvar:b}}
{{ViewTest|Examples|Module: dplvar (example_1)}}
* c={{#dplvar:c}}
'''Part 2 Result:'''
* d={{#dplvar:d}}
{{#lsth:Examples/Module: dplvar (example 1)|Part 2 Result}}
 
 
'''Notes:'''
==Example 2==
* Variable "c" was set to "cccc" because it was set but with an empty note (empty value).
{{#lsth:Examples/Module: dplvar (example_2)|Example}}
* Variable "d" was set to "dddd" because it was not already set.
{{ViewTest|Examples|Module: dplvar (example 2)}}
'''Part 1 Result:'''
{{#lsth:Examples/Module: dplvar (example 2)|Result}}
 
[[Category:Other Modules]]
Anonymous user