Difference: TWikiVariables (46 vs. 47)

Revision 4706 Jan 2002 - MikeMannix

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

Overview

Changed:
<
<
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

Changed:
<
<
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.
 
Changed:
<
<
TWiki expands the following variables (enclosed in % percent signs):
>
>
  • TIP 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.2.2, Wed, 06 Aug 2008, build 17396 - expands the following variables (enclosed in % percent signs):

 
Line: 48 to 50
 
Returns the value of a URL parameter. Ex: %URLPARAM{"skin"}% returns print for a .../view/TWiki/TWikiVariables?skin=print URL. Is
%WIKITOOLNAME%
Changed:
<
<
Name of wiki tool, is TWiki
>
>
The name of your TWiki site - TWiki
 
%WIKIVERSION%
Changed:
<
<
Wiki tool version is TWiki-4.2.2, Wed, 06 Aug 2008, build 17396
>
>
Your current TWiki version - TWiki-4.2.2, Wed, 06 Aug 2008, build 17396
 
%USERNAME%
Changed:
<
<
Your login username is guest
>
>
Your login username - guest
 
%WIKINAME% Your Wiki username. Same as %USERNAME% if not defined in the TWikiUsers topic. Is TWikiGuest
%WIKIUSERNAME%
Changed:
<
<
Your %WIKINAME% including the Main web name. Usefull for signatures. Is Main.TWikiGuest
>
>
Your %WIKINAME% including the Main web name - always use full signatures - Main.TWikiGuest
 
%MAINWEB%
Changed:
<
<
The Main web containing TWikiUsers, OfficeLocations and TWikiGroups. Is Main
>
>
The web containing TWikiUsers, OfficeLocations and TWikiGroups is Main
 
%TWIKIWEB%
Changed:
<
<
The web containing all documentation and configuration of TWiki is TWiki
>
>
The web containing all documentation and site-wide preference settings for TWiki - TWiki
 
%WEB% The current web is TWiki
Line: 75 to 77
 
The web name where the includes started, e.g. the web of the first topic of nested includes. Same as %WEB% in case there is no include.
%INCLUDINGWEB%
Changed:
<
<
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%
Changed:
<
<
The home topic in each web. Is WebHome
>
>
The home topic in each web - WebHome
 
%NOTIFYTOPIC%
Changed:
<
<
The notify topic in each web. Is WebNotify
>
>
The notify topic in each web - WebNotify
 
%WIKIUSERSTOPIC%
Changed:
<
<
The index topic of all registered users. Is TWikiUsers
>
>
The index topic of all registered users - TWikiUsers
 
%WIKIPREFSTOPIC%
Changed:
<
<
The web preferences topic. Is TWikiPreferences
>
>
The site-wide preferences topic - TWikiPreferences
 
%WEBPREFSTOPIC%
Changed:
<
<
The web preferences topic. Is WebPreferences
>
>
The local web preferences topic in each web - WebPreferences
 
%STATISTICSTOPIC%
Changed:
<
<
The web statistics topic. Is WebStatistics
>
>
The web statistics topic WebStatistics
 
%TOPIC%
Changed:
<
<
The current topic name, is TWikiVariables
>
>
The current topic name - TWikiVariables
 
%BASETOPIC%
Changed:
<
<
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% The name of the topic that includes the current topic. Same as %TOPIC% in case there is no include.
Line: 121 to 123
 
%TOPICLIST{" <option>$name</option>"}% creates an option list (for drop down menus).
%WEBLIST{"format"}%
Changed:
<
<
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.
>
>
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:
Parameter: Description: Default:
<-- -->
Sorted ascending
"format" Format of one line, may include $name variable "$name"
Line: 234 to 236
 
[1] Note: The search form uses identical names for input fields.
Changed:
<
<
[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

Line: 349 to 351
 

Setting Preferences

Changed:
<
<
  • 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

Line: 363 to 366
 

-- PeterThoeny - 13 Sep 2001

Changed:
<
<
-- MikeMannix? - 30 Nov 2001
>
>
-- MikeMannix? - 05 Jan 2002
 
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