You need to enable JavaScript to run this website.

User-defined variables in wiki.conf

Related articles

predefined variables in wiki.conf

Integer variables allow arithmetic

There are two kinds of variables in wiki.conf: integer and string ones.

Suppose a small business owner runs a business website and updates the prices once in a while. If some service is mentioned on several pages, it might be hard to synchronize its price across all pages.

Updates like that become easier using variables in wiki.conf, for example:
laborRate=33

Example

Using this variable, on one web page we may write
"you can hire me at $<<laborRate>>/hour",
and somewhere else
"I will serve you for $<<8*<<laborRate>>>>/day"

During the compilation of the text source to HTML, <<laborRate>> will be replaced with its value 33, and <<8*<<laborRate>>>> will be replaced by 264. (Numerical variables support arithmetic and parenthesis).

Updating a variable updates all web pages

Suppose that next year US dollar looses another 7% of its value and we decide to adjust the pay rate. All we have to do then is to change the value in wiki.conf:
laborRate=36

After that, all web pages referring to laborRate variable will be properly updated.

String variables

Variables are handy not only for business websites.

For example, a playboy (or a playgirl) who is changing friends often, can define a variable
friendsLinkedin=jamesBond

Using this variable, they can insert a link to friend's linkedin account as follows:
"Please visit
[[https://www.linkedin.com/in/<<friendslinkedin>>][my friend's linkedin]]
and hire them ASAP or I will change him to
friendsLinkedin=IndianaJones
in my wiki.conf file."

howtos manuals info
Telegram YouTube WhatsApp