Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

Dplvar: Difference between revisions

m
Formatting fixes/changes
imported>FrozenPlum
(Update with examples that can be mucked with and saved in user sandbox)
imported>FrozenPlum
m (Formatting fixes/changes)
 
(One intermediate revision by the same user not shown)
Line 2:
 
==Syntax==
* '''Sets one''' symbolic variable name and assign a value:
<pre>{{#dplvar:set|varname|valueofvar}}</pre>
<pre>
{{#dplvar:set|varname|valueofvar}}
</pre>
 
* '''Sets multiple''' symbolic variable names '''and assigns''' values to them (one after the other):
<pre>
{{#dplvar:set|name1|value1|name2|value2|..|..}}
</pre>
 
* '''Assigns''' a value '''only if the variable is empty / has not been used''' so far:
<pre>
{{#dplvar:default|name|value}}
</pre>
 
* '''Returns''' the current value of the variable:
<pre>
{{#dplvar:name}}
</pre>
{{note|The'''Note:''' variablesVariables can be set and retrieved from an article page, or from templates used in that article.}}
 
 
==Example 1==
Line 34 ⟶ 33:
'''Part 2 Result:'''
{{#lsth:Examples/Module: dplvar (example 1)|Part 2 Result}}
 
 
==Example 2==
'''Example:'''
{{#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]]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.