Difference: TWikiVariables (81 vs. 82)

Revision 822006-03-19 - TWikiContributor

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Line: 36 to 36
 

Setting Preferences Variables

You can set variables in all the following places:
  1. local site level in TWiki.TWikiPreferences
Added:
>
>
  1. plugin topics (see TWikiPlugins)
 
  1. local site level in Main.TWikiPreferences
  2. user level in individual user topics in Main web
  3. web level in WebPreferences of each web
  4. topic level in topics in webs
Deleted:
<
<
  1. plugin topics (see TWikiPlugins)
 
  1. session variables (if sessions are enabled)

Settings at higher-numbered levels override settings of the same variable at lower numbered levels, unless the variable was included in the setting of FINALPREFERENCES at a lower-numbered level, in which case it is locked at the value it has at that level.

The syntax for setting Variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets):
[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [space] value

Changed:
<
<
>
>
 Examples:
  • Set VARIABLENAME = value
    • Set VARIABLENAME = value
Spaces between the = sign and the value will be ignored. You can split a value over several lines by indenting following lines with spaces - as long as you don't try to use * as the first character on the following line.
Changed:
<
<
>
>
 Example:
   * Set VARIABLENAME = value starts here

Line: 62 to 62
  Whatever you include in your Variable will be expanded on display, exactly as if it had been entered directly.
Changed:
<
<
>
>
 Example: Create a custom logo variable
  • To place a logo anywhere in a web by typing %MYLOGO%, define the Variable on the web's WebPreferences topic, and upload a logo file, ex: mylogo.gif. You can upload by attaching the file to WebPreferences, or, to avoid clutter, to any other topic in the same web, e.g. LogoTopic. Sample variable setting in WebPreferences:
    • Set MYLOGO = %PUBURL%/%WEB%/LogoTopic/mylogo.gif
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiVariables