From e2b17e2439df7add80bd46ae32cbd0a60a082df5 Mon Sep 17 00:00:00 2001 From: MikeMannix Date: Sun, 6 Jan 2002 03:45:00 +0000 Subject: [PATCH] none --- TWiki/TWikiVariables.mdwn | 57 +++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/TWiki/TWikiVariables.mdwn b/TWiki/TWikiVariables.mdwn index 44383bc..e394ca3 100644 --- a/TWiki/TWikiVariables.mdwn +++ b/TWiki/TWikiVariables.mdwn @@ -17,13 +17,15 @@ _Text strings expanded on the fly to display data or system info_ ## Overview -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. +TWikiVariables are text strings - `%VARIABLE%` - that expand into content whenever a page is opened. When a topic is rendered for viewing, `VARIABLES` are replaced by data, either user-entered, or info automatically generated by TWiki (like the date, or the current username). There are predefined variables, and Preference variables that you configure. You can also define custom variables, with new names and values. ## Predefined Variables -Most predefined variables return values that were either defined when TWiki was installed, or taken from server info (like current username, or date and time). Many of the variables let you control how the formatted results appear. +Most predefined variables return values that were either set in the **lib/twiki.cfg** file, when TWiki was installed, or taken from server info (like current username, or date and time). Many of the variables let you format the appearance of the display results. -%WIKITOOLNAME% expands the following variables (enclosed in **%** percent signs): +- %T% **Take the time to thoroughly read through ALL preference variables.** If you actively configure your site, review variables periodically. They cover a wide range of functions, and it can be easy to miss the one perfect variable for something you have in mind. For example, see **%INCLUDINGTOPIC%**, **%INCLUDE%**, and the mighty **%SEARCH%**. + +This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the following variables (enclosed in **%** percent signs): @@ -68,15 +70,15 @@ Most predefined variables return values that were either defined when TWiki was - + - + - + @@ -84,15 +86,15 @@ Most predefined variables return values that were either defined when TWiki was - + - + - + @@ -104,39 +106,39 @@ Most predefined variables return values that were either defined when TWiki was - + - + - + - + - + - + - + - + - + @@ -178,7 +180,7 @@ Most predefined variables return values that were either defined when TWiki was - - + - + @@ -476,7 +478,7 @@ Most predefined variables return values that were either defined when TWiki was > > : The search form uses identical names for input fields. > -> [2] **_Note_**: A web can be excluded from a `web="all"` search if you define a `NOSEARCHALL=on` variable in its [[WebPreferences]]. +> [2] **_Note_**: A web can be excluded from a **web="all"** search if you define a **NOSEARCHALL=on** variable in its [[WebPreferences]]. ## Preferences Variables @@ -621,8 +623,9 @@ Additional variables are defined in the preferences ( site-level ( **_SL_** ) in ## Setting 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** +- The syntax for Preferences variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets):
[3 spaces] \* [space] Set [space] VARIABLENAME [space] = [value]
**_Examples:_** +- **Set VARIABLENAME = =value=** + - **Set VARIABLENAME = =value=** ## Creating Custom Variables @@ -635,4 +638,4 @@ Additional variables are defined in the preferences ( site-level ( **_SL_** ) in > - 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|Main/FileAttachment]] to `LogoTopic` (any topic name you choose): > - **Set MYLOGO = %PUBURL%/%MAINWEB%/LogoTopic/logo.gif** --- [[PeterThoeny]] - 13 Sep 2001
-- [[MikeMannix]] - 30 Nov 2001 +-- [[PeterThoeny]] - 13 Sep 2001
-- [[MikeMannix]] - 05 Jan 2002 -- 1.9.4
%WIKITOOLNAME% Name of wiki tool, is %WIKITOOLNAME% The name of your TWiki site - %WIKITOOLNAME%
%WIKIVERSION% Wiki tool version is TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 Your current TWiki version - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046
%USERNAME% Your login username is admin Your login username - admin
%WIKINAME%
%WIKIUSERNAME% Your %WIKINAME% including the Main web name. Usefull for signatures. Is Main.admin Your %WIKINAME% including the Main web name - always use full signatures - Main.admin
%MAINWEB% The Main web containing [[Main/TWikiUsers]], [[Main/OfficeLocations]] and [[Main/TWikiGroups]]. Is Main The web containing [[Main/TWikiUsers]], [[Main/OfficeLocations]] and [[Main/TWikiGroups]] is Main
%TWIKIWEB% The web containing all documentation and configuration of %WIKITOOLNAME% is TWiki The web containing all documentation and site-wide preference settings for %WIKITOOLNAME% - TWiki
%WEB%
%INCLUDINGWEB% The web name of the topic that includes the current topic. Same as %WEB% in case there is no include. The web name of the topic that includes the current topic - same as %WEB% if there is no INCLUDE.
%HOMETOPIC% The home topic in each web. Is [[Main/WebHome]] The home topic in each web - [[Main/WebHome]]
%NOTIFYTOPIC% The notify topic in each web. Is [[Main/WebNotify]] The notify topic in each web - [[Main/WebNotify]]
%WIKIUSERSTOPIC% The index topic of all registered users. Is TWikiUsers The index topic of all registered users - TWikiUsers
%WIKIPREFSTOPIC% The web preferences topic. Is TWikiPreferences The site-wide preferences topic - TWikiPreferences
%WEBPREFSTOPIC% The web preferences topic. Is WebPreferences The local web preferences topic in each web - WebPreferences
%STATISTICSTOPIC% The web statistics topic. Is WebStatistics The web statistics topic WebStatistics
%TOPIC% The current topic name, is %TOPIC% The current topic name - %TOPIC%
%BASETOPIC% The name of the topic where the includes started, e.g. the first topic of nested includes. Same as %TOPIC% in case there is no include. The name of the topic where a single or nested INCLUDE started - same as %TOPIC% if there is no INCLUDE.
%INCLUDINGTOPIC%
%WEBLIST{"format"}% Web index, e.g. list of all webs. Hidden webs are excluded, e.g. webs with a NOSEARCHALL=on preference variable. The "format" defines the format of one web item. The $name variable gets expanded to the name of the web, $qname gets expanded to double quoted name, $marker to marker where web matches selection. Parameters are format, separator and web: + +
Web index, ex: list of all webs. Hidden webs are excluded, e.g. webs with a NOSEARCHALL=on preference variable. The "format" defines the format of one web item. The $name variable gets expanded to the name of the web, $qname gets expanded to double quoted name, $marker to marker where web matches selection. Parameters are format, separator and web: @@ -218,7 +220,7 @@ Most predefined variables return values that were either defined when TWiki was - + @@ -268,15 +270,15 @@ Most predefined variables return values that were either defined when TWiki was -
Parameter: Description:
%GMTIME% GM time, is 29 Jun 2010 - 15:31 GM time, is 29 Jun 2010 - 15:32
%GMTIME{"format"}% 2 digit year 99
Variables can be shortened to 3 characters. Example:
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% is
29 Jun, 2010 - 15:31:55
Variables can be shortened to 3 characters. Example:
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% is
29 Jun, 2010 - 15:32:44
%SERVERTIME% Server time, is 29 Jun 2010 - 11:31 Server time, is 29 Jun 2010 - 11:32
%SERVERTIME{"format"}% Formatted server time.
Example: %SERVERTIME{"$hou:$min"}% is 11:31
Formatted server time.
Example: %SERVERTIME{"$hou:$min"}% is 11:32
%HTTP_HOST%