summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TWiki/TWikiVariables.mdwn23
1 files 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 @@
### <a name="About_Variables"> About Variables </a>
-**_Include/write if not found elsewhere._**
+TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%**</code> 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.
### <a name="Predefined_Variables"> Predefined Variables </a>
@@ -29,7 +29,7 @@
</tr>
<tr>
<td><code>%<nop>SCRIPTSUFFIX%</nop></code></td>
- <td> The script suffix, i.e. <code>.pl</code>, is <b>%SCRIPTSUFFIX%</b></td>
+ <td> The script suffix, ex: <code>.pl</code>, <code>.cgi</code> is <b>%SCRIPTSUFFIX%</b></td>
</tr>
<tr>
<td><code>%<nop>PUBURL%</nop></code></td>
@@ -49,7 +49,7 @@
</tr>
<tr>
<td><code>%<nop>URLPARAM{"name"}%</nop></code></td>
- <td> Returns the value of a URL parameter. I.e. <code>%<nop>URLPARAM{"skin"}%</nop></code> returns <b>print</b> for a <code>.../view/%WEB%/%TOPIC%?skin=print</code> URL. Is <b>%URLPARAM{"skin"}%</b></td>
+ <td> Returns the value of a URL parameter. Ex: <code>%<nop>URLPARAM{"skin"}%</nop></code> returns <b>print</b> for a <code>.../view/%WEB%/%TOPIC%?skin=print</code> URL. Is <b>%URLPARAM{"skin"}%</b></td>
</tr>
<tr>
<td><code>%<nop>WIKITOOLNAME%</nop></code></td>
@@ -57,11 +57,11 @@
</tr>
<tr>
<td><code>%<nop>WIKIVERSION%</nop></code></td>
- <td> Wiki tool version, is <b>%WIKIVERSION%</b></td>
+ <td> Wiki tool version is <b>%WIKIVERSION%</b></td>
</tr>
<tr>
<td><code>%<nop>USERNAME%</nop></code></td>
- <td> Your login username, is <b>%USERNAME%</b></td>
+ <td> Your login username is <b>%USERNAME%</b></td>
</tr>
<tr>
<td><code>%<nop>WIKINAME%</nop></code></td>
@@ -77,11 +77,11 @@
</tr>
<tr>
<td><code>%<nop>TWIKIWEB%</nop></code></td>
- <td> The web containing all documentation and configuration of %WIKITOOLNAME%. Is <b>%TWIKIWEB%</b></td>
+ <td> The web containing all documentation and configuration of %WIKITOOLNAME% is <b>%TWIKIWEB%</b></td>
</tr>
<tr>
<td><code>%<nop>WEB%</nop></code></td>
- <td> The current web, is <b>%WEB%</b></td>
+ <td> The current web is <b>%WEB%</b></td>
</tr>
<tr>
<td><code>%<nop>BASEWEB%</nop></code></td>
@@ -564,11 +564,14 @@ Additional variables are defined in the preferences ( site-level ( **_SL_** ) in
</tr>
</table>
-### <a name="Setting_and_Creating_New_Prefere"> Setting and Creating New Preferences </a>
+### <a name="Setting_Variable_Preferences"> Setting Variable Preferences </a>
* The syntax for Preferences variables is the same anywhere in TWiki. In Edit mode, from the start of a new line: <br />[6 spaces] \* [space] Set [space] VARIABLENAME [space] = [value] <br />**_Example:_**
* <code>**Set VARIABLENAME = value**</code>
-* 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.<br />**_Example:_** To place a logo anywhere in a web by typing <code>**%MYLOGO%**</code>, define the variable in the web's [[WebPreferences]] topic, like this (in this case, you also have to upload <code>**logo.gif**</code> to the same directory):
+
+### <a name="Creating_Custom_Variables"> Creating Custom Variables </a>
+
+* 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.<br />**_Example:_** To place a logo anywhere in a web by typing <code>**%MYLOGO%**</code>, define the variable in the web's [[WebPreferences]] topic, like this (in this case, you also have to upload <code>**logo.gif**</code> to the same directory):
* <code>**Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif**</code>
--- [[MikeMannix]] - 26 Aug 2001 <br />
+-- [[MikeMannix]] - 30 Aug 2001 <br />