From ea4634f44ff5be699e49fc8688f385dda638ece3 Mon Sep 17 00:00:00 2001 From: MikeMannix Date: Thu, 30 Aug 2001 16:06:31 +0000 Subject: none --- TWiki/TWikiVariables.mdwn | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/TWiki/TWikiVariables.mdwn b/TWiki/TWikiVariables.mdwn index f2cc1f2f..6b4f3b47 100644 --- a/TWiki/TWikiVariables.mdwn +++ b/TWiki/TWikiVariables.mdwn @@ -4,7 +4,7 @@ ### About Variables -**_Include/write if not found elsewhere._** +TWikiVariables are text strings enclosed in percentage signs: **%VARIABLE%** that represent stored data. When a topic is rendered for viewing, defined variables replaced by their actual values. TWiki has two types of variable, predefined, and Preference-based, where you can change settings. Through Preference variables, you can even define custom variables. Clearly, they are a power TWiki feature. ### Predefined Variables @@ -29,7 +29,7 @@ %SCRIPTSUFFIX% - The script suffix, i.e. .pl, is %SCRIPTSUFFIX% + The script suffix, ex: .pl, .cgi is %SCRIPTSUFFIX% %PUBURL% @@ -49,7 +49,7 @@ %URLPARAM{"name"}% - Returns the value of a URL parameter. I.e. %URLPARAM{"skin"}% returns print for a .../view/%WEB%/%TOPIC%?skin=print URL. Is %URLPARAM{"skin"}% + Returns the value of a URL parameter. Ex: %URLPARAM{"skin"}% returns print for a .../view/%WEB%/%TOPIC%?skin=print URL. Is %URLPARAM{"skin"}% %WIKITOOLNAME% @@ -57,11 +57,11 @@ %WIKIVERSION% - Wiki tool version, is %WIKIVERSION% + Wiki tool version is %WIKIVERSION% %USERNAME% - Your login username, is %USERNAME% + Your login username is %USERNAME% %WIKINAME% @@ -77,11 +77,11 @@ %TWIKIWEB% - The web containing all documentation and configuration of %WIKITOOLNAME%. Is %TWIKIWEB% + The web containing all documentation and configuration of %WIKITOOLNAME% is %TWIKIWEB% %WEB% - The current web, is %WEB% + The current web is %WEB% %BASEWEB% @@ -564,11 +564,14 @@ Additional variables are defined in the preferences ( site-level ( **_SL_** ) in -### Setting and Creating New Preferences +### Setting Variable Preferences * The syntax for Preferences variables is the same anywhere in TWiki. In Edit mode, from the start of a new line:
[6 spaces] \* [space] Set [space] VARIABLENAME [space] = [value]
**_Example:_** * **Set VARIABLENAME = value** -* 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, images.
**_Example:_** To place a logo anywhere in a web by typing **%MYLOGO%**, define the variable in the web's [[WebPreferences]] topic, like this (in this case, you also have to upload **logo.gif** to the same directory): + +### Creating Custom Variables + +* 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.
**_Example:_** To place a logo anywhere in a web by typing **%MYLOGO%**, define the variable in the web's [[WebPreferences]] topic, like this (in this case, you also have to upload **logo.gif** to the same directory): * **Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif** --- [[MikeMannix]] - 26 Aug 2001
+-- [[MikeMannix]] - 30 Aug 2001
-- cgit v1.2.3