#+TITLE: User-defined variables in wiki.conf #+SHORT-TITLE: wiki.conf #+KEYWORDS: website builder, configuration, variables #+TOC-KEYWORDS: manuals #+DESCRIPTION: variables are useful to keep your web pages updated * Related articles [[variables][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 $\<\\>\/hour",\\ and somewhere else\\ "I will serve you for $\<\<8*\<\\>\>\>\/day"\\ During the compilation of the text source to HTML, \<\\> will be replaced with its value 33, and \<\<8*\<\\>\>\> 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 [[http://howto.leanws.com/links][insert a link]] to friend's linkedin account as follows:\\ "Please visit\\ \[\[https:\/\/www.linkedin.com\/in\/\<\\>\]\[my friend's linkedin\]\]\\ and hire them ASAP or I will change him to\\ *friendsLinkedin=IndianaJones*\\ in my *wiki.conf* file."