Variables demo

From Notaclue Wiki
Extension demonstration (infobox template)
Variables
Documentation

on mediawiki.org

Maintained by WikiTeq?

No

Version

This wiki has the Variables extension installed, which adds the ability to store and use variables in the wikitext.

Code Output Explanation
{{#vardefine:foo|something}} Set variable foo to the value something
{{#vardefineecho:bar|other}} other Set variable bar to the value other and print that value
{{#varexists:foo|yes|no}} yes Check if a variable is defined
{{#varexists:baz|yes|no}} no
{{#var:foo}} something Retrieve the value of a variable
{{#vardefine:foo|changed}} Set variable foo to the value changed, replacing previous value
{{#var:foo}} changed Retrieve the value of a variable

See also[edit | edit source]

Cookies help us deliver our services. By using our services, you agree to our use of cookies.