Difference: TWikiVariables (42 vs. 43)

Revision 4315 Sep 2001 - MikeMannix

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Deleted:
<
<

Warning: Can't find topic TWiki.UtilTempDocNote

 

TWiki Variables

Changed:
<
<
Text strings expanded on the fly include predefined, preference-driven and custom-defined data
>
>
Text strings expanded on the fly to display data or system info
 

Overview

Changed:
<
<
TWikiVariables are text strings enclosed in percentage signs: %VARIABLE% that represent stored data. When a topic is rendered for viewing, defined variables are replaced by their actual values. TWiki has two types of variable, predefined and Preference-based, where usually you determine the content. Through Preference variables, you can also define custom variables, creating new variable name and value. TWiki variables are as simple to use as they are powerful, and vice versa!
>
>
TWikiVariables are text strings - %VARIABLE% - that expand into content whenever a page is opened. Variables are replaced by their actual values: stored data, or system info (like the date, or the current user). There are predefined variables, and Preference variables that you set. You can also define custom variables, with new names and values.
 

Predefined Variables

Changed:
<
<
With a couple of notable exceptions, predefined variables return set values that are defined one-time on installation and left alone. Most are directory names and file paths, customized for your server, and only have to be updated once in the main configuration file if your server set-up changes.
>
>
With a couple of notable exceptions, predefined variables return set values that are defined on installation and left alone. Most are directory names and file paths, customized for your server, and only have to be updated once in the main configuration file if your server set-up changes.
 
Changed:
<
<
TWiki expands the following variables enclosed in % percent signs:
>
>
TWiki expands the following variables (enclosed in % percent signs):
 
Changed:
<
<
>
>
 
Variable: Expanded to:
Line: 88 to 86
 
%WIKIUSERSTOPIC% The index topic of all registered users. Is TWikiUsers
Added:
>
>
%WIKIPREFSTOPIC% The web preferences topic. Is TWikiPreferences
 
%WEBPREFSTOPIC% The web preferences topic. Is WebPreferences
Line: 238 to 239
  Additional variables are defined in the preferences ( site-level ( SL ) in TWikiPreferences, web-level ( WL ) in WebPreferences of each web, and user level ( UL ) preferences in individual user topics):
Changed:
<
<
>
>
 
Variable: Level: What:
Line: 353 to 354
 
  • You can add your own preference variables for an entire site, a single web, or a single topic, using the standard syntax. Whatever you include in your variable will be expanded on display, and treated exactly as if it had been written out. So you can place formatted text, page links, image paths.
Changed:
<
<
>
>
 Example: Create a custom logo variable
  • To place a logo anywhere in a web by typing %MYLOGO%, simply define the variable on the web's WebPreferences page. You also have to upload logo.gif - this can be done by attaching a file to LogoTopic (any topic name you choose):
    • Set MYLOGO = %PUBURL%/%MAINWEB%/LogoTopic/logo.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