- TWiki Variables
- Using Variables
- Variable Names
- Preferences Variables
- Predefined Variables
- ACTIVATEDPLUGINS -- list of currently activated plugins
- ALLOWTOPICVIEW, ALLOWTOPICCHANGE, ALLOWTOPICRENAME -- access control for topics
- ALLOWWEBVIEW, ALLOWWEBCHANGE, ALLOWWEBRENAME -- access control for webs
- ALLVARIABLES -- list of currently defined TWikiVariables
- AQUA -- preference value for colored text
- ATTACHEDIMAGEFORMAT -- default value for attachment link
- ATTACHFILESIZELIMIT -- installation logo image
- ATTACHLINKBOX -- default value for attachment link checkbox
- ATTACHURL -- full URL for attachments in the current topic
- ATTACHURLPATH -- path of the attachment URL of the current topic
- AUTHREALM -- authentication realm
- BASETOPIC -- base topic where an INCLUDE started
- BASEWEB -- base web where an INCLUDE started
- BB, BB2, BB3, BB4 -- bullets with different levels of indentation
- BLACK -- preference value for colored text
- BLUE -- preference value for colored text
- BR -- shortcut for line break
- BROADCASTMESSAGE -- message shown at page top
- BROWN -- preference value for colored text
- BULLET -- bullet character
- COMPOSER -- select WYSIWYG editor
- DATE -- signature format date
- DENYTOPICVIEW, DENYTOPICCHANGE, DENYTOPICRENAME -- access control for topics
- DENYWEBVIEW, DENYWEBCHANGE, DENYWEBRENAME -- access control for webs
- DISPLAYTIME -- display time
- DISPLAYTIME{"format"} -- formatted display time
- DONTNOTIFYCHECKBOX -- suppress email notification after editing
- EDITBOXWIDTH, EDITBOXHEIGHT, EDITBOXSTYLE -- show / hide meta data for links
- ENCODE{"string"} -- encodes a string to HTML entities
- ENDSECTION{"name"} -- marks the end of a named section within a topic
- FAILEDPLUGINS -- debugging for plugins that failed to load, and handler list
- FAVICON -- default favicon
- FINALPREFERENCES -- list of preferences which must not be overridden
- FORCENEWREVISIONCHECKBOX -- default value for new revisions after editing
- FORMFIELD{"fieldname"} -- renders a field in the form attached to some topic
- GMTIME -- GM time
- GMTIME{"format"} -- formatted GM time
- GRAY -- preference value for colored text
- GREEN -- preference value for colored text
- GROUPS -- a formatted list of groups
- H -- help icon
- HOMETOPIC -- home topic in each web
- HTTP -- get HTTP headers
- HTTP_HOST -- environment variable
- HTTPS -- get HTTPS headers
- HTTP_EQUIV_ON_EDIT, HTTP_EQUIV_ON_PREVIEW, HTTP_EQUIV_ON_VIEW -- Extra HEAD elements
- I -- idea icon
- ICON{"name"} -- small documentation graphic or icon of common attachment types
- ICONURL{"name"} -- URL of small documentation graphic or icon
- ICONURLPATH{"name"} -- URL path of small documentation graphic or icon
- IF{"condition" ...} -- simple conditionals
- INCLUDE{"page"} -- include other topic or web page
- INCLUDEWARNING -- allow includes to fail silently
- INCLUDINGTOPIC -- name of topic that includes current topic
- INCLUDINGWEB -- web that includes current topic
- LANGUAGE -- current user's language
- LANGUAGES -- list available TWiki languages
- LIME -- preference value for colored text
- LINKTOOLTIPINFO -- show / hide meta data for links
- LOCALSITEPREFS -- web.topicname of site preferences topic
- LOGIN -- present a full login link
- LOGOUT -- present a full logout link
- M -- moved to... icon
- MAILTHISTOPIC, MAILTHISTOPICTEXT -- mail a link to a TWiki topic
- MAINWEB -- name of Main web
- MAKETEXT -- creates text using TWiki's I18N infrastructure
- MAROON -- preference value for colored text
- META -- displays meta-data
- METASEARCH -- special search of meta data
- N -- "new" icon
- NAVY -- preference value for colored text
- NEWTOPICBGCOLOR, NEWTOPICFONTCOLOR -- styles for nonexisting topics
- NOAUTOLINK -- do not autolink WikiWords and acronyms
- NOP -- template text not to be expanded in instantiated topics
- NOSEARCHALL -- exclude a web from a web=all search deprecated
- NOTIFYTOPIC -- name of the notify topic
- OLIVE -- preference value for colored text
- ORANGE -- preference value for colored text
- P -- pencil icon
- PINK -- preference value for colored text
- PLUGINDESCRIPTIONS -- list of plugin descriptions
- PLUGINVERSION -- the version of a TWiki Plugin, or the TWiki Plugins API
- PREVIEWBGIMAGE -- preview background image
- PUBURL -- the base URL of attachments
- PUBURLPATH -- the base URL path of attachments
- PURPLE -- preference value for colored text
- Q -- question icon
- QUERYSTRING -- full, unprocessed string of parameters to this URL
- RED -- preference value for colored text
- REMOTE_ADDR -- environment variable
- REMOTE_PORT -- environment variable
- REMOTE_USER -- environment variable
- REVINFO -- revision information of current topic
- REVINFO{"format"} -- formatted revision information of topic
- S -- red star icon
- SCRIPTNAME -- name of current script
- SCRIPTSUFFIX -- script suffix
- SCRIPTURL -- base URL of TWiki scripts
- SCRIPTURL{"script"} -- URL of TWiki script
- SCRIPTURLPATH -- base URL path of TWiki scripts
- SCRIPTURLPATH{"script"} -- URL path of TWiki script
- SEARCH{"text"} -- search content
- SEARCHDEFAULTTTYPE -- default type for search
- SEARCHSTOPWORDS -- words to exclude from search
- SEARCHVARDEFAULTTYPE -- default type for search
- SERVERTIME -- server time
- SERVERTIME{"format"} -- formatted server time
- SESSIONID -- unique ID for this session
- SESSIONVAR -- name of CGI and session variable that stores the session ID
- SESSION_VARIABLE -- get, set or clear a session variable
- SILVER -- preference value for colored text
- SITEMAPLIST, SITEMAPWHAT, SITEMAPUSETO -- control SiteMap appearance
- SKIN -- how your Foswiki looks like
- SPACEDTOPIC -- topic name, spaced and URL-encoded deprecated
- SPACEOUT{"string"} -- renders string with spaces inserted in sensible places
- STARTINCLUDE -- start position of topic text if included
- STARTSECTION -- marks the start of a section within a topic
- STATISTICSTOPIC -- name of statistics topic
- STOPINCLUDE -- end position of topic text if included
- T -- tip icon
- TEAL -- preference value for colored text
- TOC -- table of contents of current topic
- TOC{"Topic"} -- table of contents
- TOPIC -- name of current topic
- TOPICLIST{"format"} -- topic index of a web
- TOPICURL -- shortcut to viewing the current topic
- TWIKICOLORSURL -- location of custom colors style sheet
- TWIKILAYOUTURL -- location of layout style sheet
- TWIKISTYLEURL -- location of styles style sheet
- TWIKIWEB -- name of TWiki documentation web
- U -- "updated" icon
- URLPARAM{"name"} -- get value of a URL parameter
- USERCOLORSURL -- location of custom colors style sheet
- USERINFO - retrieve details about a user (by default the logged-in user)
- USERLAYOUTURL -- location of custom layout style sheet
- USERNAME -- your login username
- USERSTYLEURL -- location of custom styles style sheet
- VAR{"NAME" web="Web"} -- get a preference value from another web
- WEB -- name of current web
- WEBBGCOLOR -- background color for a web
- WEBCOPYRIGHT -- shortcut for a web's copyright message
- WEBFORMS -- list of forms which can be used
- WEBHEADERART, WEBHEADERBGCOLOR -- header art
- WEBLIST{"format"} -- index of all webs
- WEBLOGOIMG, WEBLOGOURL, WEBLOGOALT -- default web logo image
- WEBPREFSTOPIC -- name of web preferences topic
- WEBRSSCOPYRIGHT -- shortcut for a web's RSS copyright message
- WEBTOPICLIST -- standard navigation links
- WHITE -- preference value for colored text
- WIKIHOMEURL -- site home URL deprecated
- WIKILOGOIMG, WIKILOGOURL, WIKILOGOALT -- installation logo image
- WIKINAME -- your Wiki username
- WIKIPREFSTOPIC -- name of site-wide preferences topic
- WIKITOOLNAME -- name of your TWiki site
- WIKIUSERNAME -- your Wiki username with web prefix
- WIKIUSERSTOPIC -- name of topic listing all registers users
- WIKIVERSION -- the version of the installed TWiki engine
- WIKIWEBLIST -- static list of webs
- WIKIWEBMASTER, WIKIWEBMASTERNAME -- web master address and name
- X -- warning icon
- Y -- "yes" icon
- YELLOW -- preference value for colored text
TWiki Variables
Special text strings expand on the fly to display user data or system info
TWikiVariables are text strings -
%VARIABLE% or
%VARIABLE{ parameter="value" }% - that expand into content whenever a topic is rendered for viewing. There are two types of variables:
- Preferences variables: Can be defined and changed by the user
- Predefined variables: Defined by the TWiki system or by Plugins (for example, the Spread Sheet Plugin introduces a
%CALC{}% variable)
Using Variables
To use a variable type its name. For example,
- type
%T% to get
(a preferences variable)
- type
%TOPIC% to get TWikiVariables (a predefined variable)
- type
%CALC{ "$UPPER(Text)" }% to get TEXT (a variable defined by Plugin)
Note:
- To leave a variable unexpanded, precede it with an exclamation point, e.g. type
!%TOPIC% to get %TOPIC%
- Variables are expanded relative to the topic they are used in, not the topic they are defined in
- Type
%ALLVARIABLES% to get a full listing of all variables defined for a particular topic
Variable Names
Variable names must start with a letter. The following characters can be letters, numbers and the underscore '_'. You can use both upper-case and lower-case letters and you can mix the characteres. E.g.
%MYVAR%,
%MyVar%,
%My2ndVar%, and
%My_Var% are all valid variable names. Variables are case sensitive.
%MyVAR% and
%MYVAR% are not the same variable.
By convention all settings, predefined variables and variables used by plugins are always UPPER-CASE.
Preferences Variables
Unlike predefined variables, preferences variables can be defined by the user in various places.
Setting Preferences Variables
You can set variables in all the following places:
- local site level in Site Preferences
- user level in individual user topics in Main web
- web level in Web Preferences of each web
- topic level in topics in webs
- plugin topics (see TWiki Plugins)
- session variables (if sessions are enabled)
Settings at higher-numbered levels override settings of the same variable at lower numbered levels, unless the variable was included in the setting of FINALPREFERENCES at a lower-numbered level, in which case it is locked at the value it has at that level.
The syntax for setting Variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets):
[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [space] value
Examples:
Spaces between the = sign and the value will be ignored. You can split a value over several lines by indenting following lines with spaces - as long as you don't try to use * as the first character on the following line.
Example:
* Set VARIABLENAME = value starts here
and continues here
Whatever you include in your Variable will be expanded on display, exactly as if it had been entered directly.
Example: Create a custom logo variable
- To place a logo anywhere in a web by typing
%MYLOGO%, define the Variable on the web's Web Preferences topic, and upload a logo file, ex: mylogo.gif. You can upload by attaching the file to Web Preferences, or, to avoid clutter, to any other topic in the same web, e.g. LogoTopic. Sample variable setting in Web Preferences:
-
Set MYLOGO = %PUBURL%/%WEB%/LogoTopic/mylogo.gif
You can also set preferences variables on a topic by clicking the link
Edit topic preference settings under
More topic actions. Preferences set in this manner are not visible in the topic text, but take effect nevertheless.
Access Control Variables
These are special types of preferences variables to control access to content.
TWiki Access Control explains these security settings in detail.
Local values for variables
Certain topics (a users home topic, web site and default preferences topics) have a problem; variables defined in those topics can have two meanings. For example, consider a user topic. A user may want to use a double-height edit box when they are editing their home topic - but
only when editing their home topic. The rest of the time, they want to have a normal edit box. This separation is achieved using
Local in place of
Set in the variable definition. For example, if the user sets the following in their home topic:
* Set EDITBOXHEIGHT = 10
* Local EDITBOXHEIGHT = 20
Then when they are editing any other topic, they will get a 10 high edit box. However when they are editing their home topic, they will get a 20 high edit box.
Local can be used wherever a preference needs to take a different value depending on where the current operation is being performed.
Use this powerful feature with great care!
%ALLVARIABLES% can be used to get a listing of the values of all variables in their evaluation order, so you can see variable scope if you get confused.
Frequently Used Preferences Variables
The following preferences variables are frequently used. They are defined in
TWiki Preferences#Miscellaneous Settings:
-
%BR% - line break
-
%BULLET% - bullet sign
-
%BB% - line break and bullet combined
-
%BB2% - indented line break and bullet
-
%RED% text %ENDCOLOR% - colored text (also %YELLOW%, %ORANGE%, %PINK%, %PURPLE%, %TEAL%, %NAVY%, %BLUE%, %AQUA%, %LIME%, %GREEN%, %OLIVE%, %MAROON%, %BROWN%, %BLACK%, %GRAY%, %SILVER%, %WHITE%)
-
%H% -
Help icon
-
%I% -
Idea icon
-
%M% -
Moved to icon
-
%N% -
New icon
-
%P% -
Refactor icon
-
%Q% -
Question icon
-
%S% -
Pick icon
-
%T% -
Tip icon
-
%U% -
Updated icon
-
%X% -
Alert icon
-
%Y% -
Done icon
There are additional useful preferences variables defined in
TWiki Preferences, in
Main.Site Preferences, and in
Web Preferences of every web.
Predefined Variables
Most predefined variables return values that were either set in the configuration when TWiki was installed, or taken from server info (such as current username, or date and time). Some, like
%SEARCH%, are powerful and general tools.
-
Predefined variables can be overridden by preferences variables
-
Plugins may extend the set of predefined variables (see individual Plugins topics for details)
-
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 - Foswiki-1.1.4, Tue, 20 Dec 2011, build 13483 - predefines the following variables:
ACTIVATEDPLUGINS -- list of currently activated plugins
- Syntax:
%ACTIVATEDPLUGINS%
- Expands to: TWiki Compatibility Plugin, Spread Sheet Plugin, Adverts Plugin, Auto View Template Plugin, Calendar Plugin, Comment Plugin, Compare Revisions Addon Plugin, Edit Table Plugin, Embed Plugin, Google Analytics Plugin, History Plugin, Image Gallery Plugin, Interwiki Plugin, JQuery Plugin, Mailer Contrib Plugin, Preferences Plugin, Redirect Plugin, Render List Plugin, Slide Show Plugin, Smilies Plugin, Spaced Wiki Word Plugin, Table Plugin, Tiny MCEPlugin, Twisty Plugin, Wysiwyg Plugin
- Related: PLUGINDESCRIPTIONS, FAILEDPLUGINS, PLUGINVERSION
ALLOWTOPICVIEW, ALLOWTOPICCHANGE, ALLOWTOPICRENAME -- access control for topics
These variables define lists of users and groups who may view or edit
topics, or move them around.
ALLOWWEBVIEW, ALLOWWEBCHANGE, ALLOWWEBRENAME -- access control for webs
These variables define lists of users and groups who may view or edit
topics in a web, or move them around. They must be defined in a web's
WebPreferences topic and are ignored in other topics.
ALLVARIABLES -- list of currently defined TWikiVariables
- Syntax:
%ALLVARIABLES%
- Expands to: a table showing all defined TWiki Variables in the current context
AQUA -- preference value for colored text
AQUA is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%AQUA% aqua text %ENDCOLOR%
- Expands to: aqua text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
ATTACHEDIMAGEFORMAT -- default value for attachment link
Format of images when the
link check box is checked.
-
NOTE: Keyword $name gets expanded to filename; $comment to comment; $size to width="..." height="..." attribute of img tag; \t to tab and \n to linefeed (3 spaces for bullets).
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Type: Preference variable defined in TWiki.Default Preferences. Can be customized for a TWiki site in Main.Site Preferences, and for each web in their Web Preferences topics.
- Current value: ATTACHEDIMAGEFORMAT = \n * $comment:
ATTACHFILESIZELIMIT -- installation logo image
Maximum size of
File Attachments in KB, 0 for no limit.
ATTACHLINKBOX -- default value for attachment link checkbox
Default state of the
link check box in the attach file
page. Checkbox is initially checked if
Set ATTACHLINKBOX = checked="checked",
or unchecked if empty (
Set ATTACHLINKBOX =). If
checked, a link is created to the attached file at the end of the
topic.
ATTACHURL -- full URL for attachments in the current topic
ATTACHURLPATH -- path of the attachment URL of the current topic
AUTHREALM -- authentication realm
- String defined as {AuthRealm} in
configure. This is used in certain password encodings, and in login templates as part of the login prompt.
- Syntax:
%AUTHREALM%
- Expands to: Enter your Wiki Name. (First name and last name, no space, no dots, capitalized, e.g. John Smith?). Cancel to register if you do not have one.
- Related: TWiki User Authentication, SESSIONID, SESSIONVAR, LOGIN, LOGOUT, SESSION_VARIABLE
BASETOPIC -- base topic where an INCLUDE started
- The name of the topic where a single or nested INCLUDE started - same as
%TOPIC% if there is no INCLUDE
- Syntax:
%BASETOPIC%
- Related: BASEWEB, INCLUDINGTOPIC, INCLUDE, TOPIC
BASEWEB -- base web where an INCLUDE started
- 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.
- Syntax:
%BASEWEB%
- Related: BASETOPIC, INCLUDINGWEB, INCLUDE, WEB
BB, BB2, BB3, BB4 -- bullets with different levels of indentation
Line break and bullet with different levels of indentation.
- Type: Preference variable - TWiki Rendering Shortcut.
- Current value: BB =
•
- Current value: BB2 =
•
- Current value: BB3 =
•
- Current value: BB4 =
•
BLACK -- preference value for colored text
BLACK is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%BLACK% black text %ENDCOLOR%
- Expands to: black text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
BLUE -- preference value for colored text
BLUE is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%BLUE% blue text %ENDCOLOR%
- Expands to: blue text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
BR -- shortcut for line break
BROADCASTMESSAGE -- message shown at page top
Broadcast message for skins supporting a %BROADCASTMESSAGE% at the top of the page (IMPORTANT: Set to empty message if not used; #Comment out unused messages).
BROWN -- preference value for colored text
BROWN is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%BROWN% brown text %ENDCOLOR%
- Expands to: brown text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
BULLET -- bullet character
COMPOSER -- select WYSIWYG editor
Some skins have two editors available; the default editor, and a
second editor which is usually a WYSIWYG editor (the second editor is
used by hitting the WYSIWYG link in
pattern or
classic skins). If COMPOSER is not set, the second editor will work
the same as the
default editor. If the WysiwygPlugin is installed
and it is set to 'kupu' (the default), then the
Kupu WYSIWYG editor
will be enabled. You can change the setting to use any editor that is
enabled by setting the
cover parameter on the edit URL.
DATE -- signature format date
DENYTOPICVIEW, DENYTOPICCHANGE, DENYTOPICRENAME -- access control for topics
These variables define lists of users and groups who may
not view or edit
topics, or move them around.
DENYWEBVIEW, DENYWEBCHANGE, DENYWEBRENAME -- access control for webs
These variables define lists of users and groups who may
not view or
edit topics in a web, or move them around. Must be defined in a web's
WebPreferences topic and is ignored in other topics.
DISPLAYTIME -- display time
DISPLAYTIME{"format"} -- formatted display time
- Formatted time - either GMT or Local server time, depending on setting in configure. Same format qualifiers as
%GMTIME%
- Syntax:
%DISPLAYTIME{"format"}%
- Example:
%DISPLAYTIME{"$hou:$min"}% expands to 00:03
- Related: DISPLAYTIME, GMTIME, SERVERTIME
DONTNOTIFYCHECKBOX -- suppress email notification after editing
Default state of the
Minor Changes, Don't Notify (
Dont Notify) check
box in preview. Check box is initially checked if
Set DONTNOTIFYCHECKBOX = checked="checked", or unchecked if empty.
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Type: Preference variable - TWiki User Setting. Can be customized for a site in Main.Site Preferences, for each web in their Web Preferences topics and by individual TWikiUsers in their home topics.
- Current value: DONTNOTIFYCHECKBOX =
EDITBOXWIDTH, EDITBOXHEIGHT, EDITBOXSTYLE -- show / hide meta data for links
These variables control the layout of the edit box. The current
values are:
- EDITBOXWIDTH = 70
- EDITBOXHEIGHT = 20
- EDITBOXSTYLE = width:99%
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Type: Preference variable - TWiki User Setting. Can be customized for a site in Main.Site Preferences, for each web in their Web Preferences topics and by individual TWikiUsers in their home topics.
ENCODE{"string"} -- encodes a string to HTML entities
- Encode "special" characters to HTML numeric entities. Encoded characters are:
- all non-printable ASCII characters below space, except newline (
"\n") and linefeed ("\r")
- HTML special characters
"<", ">", "&", single quote (') and double quote (")
- TWiki special characters
"%", "[", "]", "@", "_", "*", "=" and "|"
- Syntax:
%ENCODE{"string"}%
- Supported parameters:
| Parameter: | Description: | Default: |
"string" | String to encode | required (can be empty) |
type="entity" | Encode special characters into HTML entities, like a double quote into " | URL encoding |
type="url" | Encode special characters for URL parameter use, like a double quote into %22 | (this is the default) |
- Example:
%ENCODE{"spaced name"}% expands to spaced%20name
-
Note: Values of HTML input fields must be entity encoded, for example:
<input type="text" name="address" value="%ENCODE{ "any text" type="entity" }%" />
- Related: URLPARAM
ENDSECTION{"name"} -- marks the end of a named section within a topic
- Syntax:
%ENDSECTION{"name"}%
- Syntax:
%ENDSECTION{type="include"}%
- Supported parameter:
| Parameter: | Description: |
"name" | Name of the section. |
type="..." | Type of the section being terminated; supported types "section", "include", "templateonly". |
- If the
STARTSECTION is named, the corresponding ENDSECTION must also be named with the same name. If the STARTSECTION specifies a type, then the corresponding ENDSECTION must also specify the same type. If the section is unnamed, ENDSECTION will match with the nearest unnamed %STARTSECTION% of the same type above it.
- Related: STARTSECTION
FAILEDPLUGINS -- debugging for plugins that failed to load, and handler list
FAVICON -- default favicon
This variable can be used in skin templates to provide a
icon.
FINALPREFERENCES -- list of preferences which must not be overridden
A comma separated list of preference variables which must not be
overridden in subordinate settings.
TWiki preferences get their values from a hierarchy of sources:
- An distribution default may be defined in TWiki.Default Preferences.
- A site customisation in Main.Site Preferences may override that value.
- Per-web customisation in individual Web Preferences topics can override that.
- Finally, per-user and per-topic settings can override that.
With a FINALPREFERENCES setting at one of the stages, any settings in
the following stages will be ignored. Consider, for example, a
Main.Site Preferences containing the following setting:
* Set FINALPREFERENCES = WIKIWEBMASTER
In this case none of the
Web Preferences topics can override that,
WIKIWEBMASTER is a global setting for that site.
FORCENEWREVISIONCHECKBOX -- default value for new revisions after editing
Default state of the
Force New Revision (
Force New Revision) check
box in preview. Check box is initially checked if
Set FORCENEWREVISIONCHECKBOX = checked="checked", or unchecked if empty.
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Type: Preference variable - TWiki User Setting. Can be customized for a site in Main.Site Preferences, for each web in their Web Preferences topics and by individual TWikiUsers in their home topics.
- Current value: FORCENEWREVISIONCHECKBOX =
FORMFIELD{"fieldname"} -- renders a field in the form attached to some topic
- Syntax:
%FORMFIELD{"fieldname"}%
- Supported parameters:
| Parameter: | Description: | Default: |
"fieldname" | The name of a TWiki form field | required |
topic="..." | Topic where form data is located. May be of the form Web.TopicName | Current topic |
format="..." | Format string. $value expands to the field value, and $title expands to the field title | "$value" |
default="..." | Text shown when no value is defined for the field | "" |
alttext="..." | Text shown when field is not found in the form | "" |
- Example:
%FORMFIELD{"ProjectName" topic="Projects.SushiProject" default="(not set)" alttext="ProjectName field found"}%
- Related: SEARCH
GMTIME -- GM time
GMTIME{"format"} -- formatted GM time
- Syntax:
%GMTIME{"format"}%
- Supported variables:
| Variable: | Unit: | Example |
$seconds | seconds | 59 |
$minutes | minutes | 59 |
$hours | hours | 23 |
$day | day of month | 31 |
$wday | day of the Week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) | Thu |
$dow | day of the week (Sun = 0) | 2 |
$week | number of week in year (ISO 8601) | 34 |
$month | month in ISO format | Dec |
$mo | 2 digit month | 12 |
$year | 4 digit year | 1999 |
$ye | 2 digit year | 99 |
$tz | either "GMT" (if set to gmtime), or "Local" (if set to servertime) | GMT |
$iso | ISO format timestamp | 2013-05-20T00:03:31Z |
$rcs | RCS format timestamp | 2013/05/20 00:03:31 |
$http | E-mail & http format timestamp | Mon, 20 May 2013 00:03:31 GMT |
$epoch | Number of seconds since 00:00 on 1st January, 1970 | 1369008211 |
- Variables can be shortened to 3 characters
- Example:
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% expands to 20 May, 2013 - 00:03:31
-
Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWiki Templates#Template Topics Vars for details.
- Related: DISPLAYTIME, GMTIME, SERVERTIME
GRAY -- preference value for colored text
GRAY is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%GRAY% gray text %ENDCOLOR%
- Expands to: gray text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
GREEN -- preference value for colored text
GREEN is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%GREEN% green text %ENDCOLOR%
- Expands to: green text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
GROUPS -- a formatted list of groups
H -- help icon
HOMETOPIC -- home topic in each web
HTTP -- get HTTP headers
- Called with the name of an HTTP header field, returns its value. Capitalization and the use of hyphens versus underscores are not significant.
- Syntax:
%HTTP%
- Syntax:
%HTTP{"Header-name"}%
- Examples:
%HTTP% | |
%HTTP{"Accept-language"}% | en-us,en-gb,en;q=0.7,*;q=0.3 |
%HTTP{"User-Agent"}% | CCBot/2.0 |
-
Note: You can see the HTTP headers your browser sends to the server on a number of sites e.g. http://www.ericgiguere.com/tools/http-header-viewer.html
- Related: HTTPS, REMOTE_ADDR, REMOTE_PORT, REMOTE_USER
HTTP_HOST -- environment variable
HTTPS -- get HTTPS headers
- The same as
%HTTP% but operates on the HTTPS environment variables present when the SSL protocol is in effect. Can be used to determine whether SSL is turned on.
- Syntax:
%HTTPS%
- Syntax:
%HTTPS{"Header-name"}%
- Related: HTTP, REMOTE_ADDR, REMOTE_PORT, REMOTE_USER
_EQUIV_ON_EDIT
_EQUIV_ON_PREVIEW
_EQUIV_ON_VIEW
HTTP_EQUIV_ON_EDIT, HTTP_EQUIV_ON_PREVIEW, HTTP_EQUIV_ON_VIEW -- Extra HEAD elements
Extra element(s) to be included in the HTML
head section for
the various scripts. Note that the values are not displayed in normal
view mode since they consist of HTML elements which should appear in
the
head only.
I -- idea icon
ICON{"name"} -- small documentation graphic or icon of common attachment types
- Generates the HTML img tag of a small graphic image attached to TWiki Doc Graphics. Images typically have a 16x16 pixel size. You can select a specific image by name, or you can give a full filename, in which case the type of the file will be used to select one of a collection of common file type icons.
- Syntax:
%ICON{"name"}%
- Examples:
-
%ICON{"flag-gray"}% returns
-
%ICON{"pdf"}% returns
-
%ICON{"smile.pdf"}% returns
-
%ICON{"/dont/you/dare/smile.pdf"}% returns
-
%ICON{"http://twiki.org/doc/xhtml.xsl"}% returns
- Graphic samples:
arrowbright,
bubble,
choice-yes,
hand
- File type samples:
bmp,
doc,
gif,
hlp,
html,
mp3,
pdf,
ppt,
txt,
xls,
xml,
zip
- Related: ICONURL, ICONURLPATH, Default Preferences, File Attachments, TWiki Doc Graphics
ICONURL{"name"} -- URL of small documentation graphic or icon
- Generates the full URL of a TWiki Doc Graphics image, which TWiki renders as an image. The related
%ICON{"name"}% generates the full HTML img tag. Specify image name or full filename (see ICON for details on filenames.)
- Syntax:
%ICONURL{"name"}%
- Examples:
-
%ICONURL{"arrowbright"}% returns http://www.redbourn.org.uk/pub/System/DocumentGraphics/arrowbright.png
-
%ICONURL{"novel.pdf"}% returns http://www.redbourn.org.uk/pub/System/DocumentGraphics/pdf.png
-
%ICONURL{"/queen/boheme.mp3"}% returns http://www.redbourn.org.uk/pub/System/DocumentGraphics/mp3.png
- Related: ICONURLPATH, ICON, Default Preferences, File Attachments, TWiki Doc Graphics
ICONURLPATH{"name"} -- URL path of small documentation graphic or icon
- Generates the URL path of a TWiki Doc Graphics image, typically used in an HTML img tag. Specify image name or full filename (see ICON for details on filenames.)
- Syntax:
%ICONURLPATH{"name"}%
- Examples:
-
%ICONURLPATH{"locktopic"}% returns /pub/System/DocumentGraphics/locktopic.png
-
%ICONURLPATH{"eggysmell.xml"}% returns /pub/System/DocumentGraphics/xml.png
-
%ICONURLPATH{"/doc/xhtml.xsl"}% returns /pub/System/DocumentGraphics/xsl.png
- Related: ICONURL, ICON, Default Preferences, File Attachments, TWiki Doc Graphics
IF{"condition" ...} -- simple conditionals
- Evaluate a condition and show one text or another based on the result. See details in If Statements
- Syntax:
%IF{"CONDITION" then="THEN" else="ELSE"}% shows "THEN" if "CONDITION" evaluates to TRUE, otherwise "ELSE" will be shown
- Example:
%IF{"defined FUNFACTOR" then="FUNFACTOR is defined" else=" is not defined"}% renders as ==
- Related: $IF() of Spread Sheet Plugin
INCLUDE{"page"} -- include other topic or web page
- Syntax:
%INCLUDE{"page" ...}%
- Supported parameters:
| Parameter: | Description: | Default: |
"SomeTopic" | The name of a topic located in the current web, i.e. %INCLUDE{"WebNotify"}% | |
"Web.Topic" | A topic in another web, i.e. %INCLUDE{"TWiki.SiteMap"}% | |
"http://..." | A full qualified URL, i.e. %INCLUDE{"http://twiki.org:80/index.html"}%. Supported content types are text/html and text/plain. if the URL resolves to an attachment file on the server this will automatically translate to a server-side include. | |
pattern="..." | A Regular Expression pattern to include a subset of a topic or page | none |
rev="2" | Include a previous topic revision; N/A for URLs | top revision |
raw="on" | When a page is included, normally Foswiki will process it, doing the following: 1) Alter relative links to point back to originating host, 2) Remove some basic HTML tags (html, head, body, script) and finally 3) Remove newlines from HTML tags spanning multiple lines. If you prefer to include exactly what is in the source of the originating page set this to on. raw="on" is short for disableremoveheaders="on", disableremovescript="on", disableremovebody="on", disablecompresstags="on" and disablerewriteurls="on". | disabled |
disableremoveheaders="on" | Bypass stripping headers from included HTML (everything until first </head> tag) | disabled |
disableremovescript="on" | Bypass stripping all <script> tags from included HTML | disabled |
disableremovebody="on" | Bypass stripping the </body> tag and everything around over and below it | disabled |
disablecompresstags="on" | Bypass replacing newlines in HTML tags with spaces. This compression step rewrites unmatched <'s into < entities unless bypassed | disabled |
disablerewriteurls="on" | Bypass rewriting relative URLs into absolute ones | disabled |
warn="off" | Warn if topic include fails: Fail silently (if off); output default warning (if set to on); else, output specific text (use $topic for topic name) | %INCLUDEWARNING% preferences setting |
section="name" | Includes only the specified named section, as defined in the included topic by the STARTSECTION and ENDSECTION variables | |
PARONE="val 1" PARTWO="val 2" | Any other parameter will be defined as a variable within the scope of the included topic. The example parameters on the left will result in %PARONE% and %PARTWO% being defined within the included topic. | |
- Note: JavaScript in included webpages is filtered out as a security precaution per default (disable filter with
disableremovescript parameter)
- Examples: See Include Topics And Web Pages
- Related: BASETOPIC, BASEWEB, INCLUDINGTOPIC, INCLUDINGWEB, STARTINCLUDE, STOPINCLUDE, STARTSECTION, ENDSECTION
INCLUDEWARNING -- allow includes to fail silently
Warn if an
%INCLUDE{}% fails: Fail silently if empty or
off. Output warning message (defined in templates/oopsalerts.tmpl) if set to
on. Otherwise output specific text (use
$topic for topic).
You can override this by using a
warn="..." parameter with
%INCLUDE{}%
INCLUDINGTOPIC -- name of topic that includes current topic
- The name of the topic that includes the current topic - same as
%TOPIC% in case there is no include
- Syntax:
%INCLUDINGTOPIC%
- Related: BASETOPIC, INCLUDINGWEB, INCLUDE, TOPIC
INCLUDINGWEB -- web that includes current topic
- The web name of the topic that includes the current topic - same as
%WEB% if there is no INCLUDE.
- Syntax:
%INCLUDINGWEB%
- Related: BASEWEB, INCLUDINGTOPIC, INCLUDE, WEB
LANGUAGE -- current user's language
- Returns the language code for the language used as the current user. This is the language actually used by TWiki Internationalization (e.g. in user interface).
- The language is detected from the user's browser, unless some site/web/user/session-defined setting overrides it:
- If the
LANGUAGE preference is set, it's used as user's language instead of any language detected from the browser.
- Avoid defining
LANGUAGE at a non per-user way, so each user can choose his/her preferred language.
- Related: LANGUAGES
LANGUAGES -- list available TWiki languages
- List the languages available (as
PO files) to TWiki. Those are the languages in which TWiki's user interface is available.
- Syntax:
%LANGUAGES{...}%
- Supported parameters:
| Parameter: | Description: | Default: |
format | format for each item. See below for variables available in the format string. | " * $langname" |
separator | separator between items. | "\n" (newline) |
marker="selected" | Text for $marker if the item matches selection | "selected" |
selection="%LANGUAGE%" | Current language to be selected in list | (none) |
-
format variables: | Variable | Meaning |
$langname | language's name, as informed by the translators |
$langtag | language's tag. Ex: en, pt-br, etc. |
- Example:
<select>%LANGUAGES{format="<option $marker value='$langtag'>$langname</option>" selection="%LANGUAGE%"}%</select> creates an option list of the available languages with the current language selected
LIME -- preference value for colored text
LIME is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%LIME% lime text %ENDCOLOR%
- Expands to: lime text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
LINKTOOLTIPINFO -- show / hide meta data for links
This preference variable controls the display of tool-tip topic info
on mouse-over of
Wiki Word links. Setting can be
on,
off, or
customized. An empty setting or
off setting disables the tool-tips
(for better performance). The setting can contain
$summary to show
the topic summary,
$date for the last change date,
$rev for the
revision,
$username for the login name of the last editor,
$wikiname for the WikiName,
$wikiusername for Main.WikiName,
$topic for the topic
name, and
$web for the web name.
LOCALSITEPREFS -- web.topicname of site preferences topic
- The full name of the local site preferences topic. This topic is read for preferences before TWiki.%TWIKIPREFSTOPIC% is read.
- Syntax:
%LOCALSITEPREFS%
- Expands to:
Main.SitePreferences, renders as Site Preferences
LOGIN -- present a full login link
LOGOUT -- present a full logout link
M -- moved to... icon
MAILTHISTOPIC, MAILTHISTOPICTEXT -- mail a link to a TWiki topic
'Mail this topic' mailto: link - can be included in topics, templates
or skins. It consists of two separate variables making up the link
and the link text.
MAINWEB -- name of Main web
MAKETEXT -- creates text using TWiki's I18 N? infrastructure
- Syntax:
%MAKETEXT{"string" args="..."}
- Supported parameters:
| Parameter | Description | Default |
"text" or string="text" | The text to be displayed. | none |
args="param1, param2" | a comma-separated list of arguments to be interpolated in the string, replacing the [_N] placeholders in it. | none |
- Examples:
-
%MAKETEXT{string="Notes:"}%
expands to
Notes:
-
%MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}%
expands to
If you have any questions, please contact martin.cleaver@blendedperspectives.com.
-
%MAKETEXT{"Did you want to [[[_1]][reset [_2]'s password]]?" args="%TWIKIWEB%.ResetPassword,%WIKIUSERNAME%"}%
expands to
Did you want to reset Main.WikiGuest's password?
- Notes:
- TWiki will translate the
string to the current user's language only if it has such string in its translation table for that language.
- Amperstands (
&) followed by one letter (one of a...z, A...Z) (say, X) in the translatable string will be translated to <span class='twikiAccessKey'>X</span>. This is used to implement access keys. If you want to write an actual amperstand that stays just before a letter, write two consecutive amperstands (&&): they will be transformed in just one.
- translatable string starting with underscores (
_) are reserved. You cannot use translatable phrases starting with an underscore.
- Make sure that the translatable string is constant. Specially, do not include
%VARIABLES% inside the translatable strings (since they will get expanded before the %MAKETEXT{...}% itself is handled).
MAROON -- preference value for colored text
MAROON is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%MAROON% maroon text %ENDCOLOR%
- Expands to: maroon text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
META -- displays meta-data
- Provided mainly for use in templates, this variable generates the parts of the topic view that relate to meta-data (attachments, forms etc.) The
formfield item is the most likely to be useful to casual users.
- Syntax:
%META{ "item" ...}%
- Parameters:
| Item | Options | Description |
"formfield" | name="..." - name of the field. The field value can be shortened as described in Formatted Search for $formfield | Show a single form field |
"form" | none | Generates the table showing the form fields. See Form Templates |
"attachments" | all="on" to show hidden attachments | Generates the table showing the attachments |
"moved" | none | Details of any topic moves |
"parent" | dontrecurse="on": By default recurses up tree, this has some cost. nowebhome="on": Suppress WebHome. prefix="...": Prefix that goes before parents, but only if there are parents, default "". format="...": format string used to display each partent topic, default "[[$web.$topic][$topic]]" suffix="...": Suffix, only appears if there are parents, default "". separator="...": Separator between parents, default " > ". | Generates the parent link |
- Related: METASEARCH
METASEARCH -- special search of meta data
- Syntax:
%METASEARCH{...}%
- Supported parameters:
| Parameter: | Description: | Default: |
type="topicmoved" | What sort of search is required? "topicmoved" if search for a topic that may have been moved "parent" if searching for topics that have a specific parent i.e. its children "field" if searching for topics that have a particular form field value (use the name and value parameters to specify which field to search) | required |
web="%WEB%" | Wiki web to search: A web, a list of webs separated by whitespace, or all webs. | current web |
topic="%TOPIC%" | The topic the search relates to, for topicmoved and parent searches | current topic |
name | form field to search, for field type searches. May be a regular expression (see SEARCH). | |
value | form field value, for field type searches. May be a regular expression (see SEARCH). | |
title="Title" | Text that is prefixed to any search results | empty |
default="none" | Default text shown if no search hit | empty |
- Example:
%METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}%
- Example: You may want to use this in Web Topic View Template and Web Topic Non Wiki Template:
%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%
- Example:
%METASEARCH{type="field" name="Country" value="China"}%
- Related: SEARCH, META
N -- "new" icon
NAVY -- preference value for colored text
NAVY is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%NAVY% navy text %ENDCOLOR%
- Expands to: navy text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
NEWTOPICBGCOLOR, NEWTOPICFONTCOLOR -- styles for nonexisting topics
Background and font color for a non existing topic.
NOAUTOLINK -- do not autolink Wiki Words and acronyms
If set to
on in a web's
Web Preferences, automatic linking of
Wiki Words and acronyms is prevented for this web.
Note: Use the [[...][...]] syntax to link topics in case you disabled
Wiki Word linking. The <noautolink> ... </noautolink> syntax can be used to prevents links within a block of text.
NOP -- template text not to be expanded in instantiated topics
- Syntax:
%NOP%
- In normal topic text, expands to <nop>, which prevents expansion of adjacent variables and wikiwords
- When the topic containing this is used as a template for another topic, it is removed.
- Syntax:
%NOP{...}% deprecated
- In normal topic text, expands to whatever is in the curly braces (if anything).
-
Note: This is deprecated. Do not use it. Use %STARTSECTION{type="templateonly"}% .. %ENDSECTION{type="templateonly"}% instead (see TWiki Templates for more details).
- Related: STARTSECTION, TWiki Templates
NOSEARCHALL -- exclude a web from a web=all search deprecated
If set to
on in a web's
Web Preferences, this web is excluded
from a search with a
web=all attribute.
This variable is not intended to be expanded in any topic.
Note: it is much better to use
TWiki Access Controls? in individual webs to control who can and can't view the contents of a web. NOSEARCHALL is retained for compatibility, but you should avoid using it.
NOTIFYTOPIC -- name of the notify topic
OLIVE -- preference value for colored text
OLIVE is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%OLIVE% olive text %ENDCOLOR%
- Expands to: olive text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
ORANGE -- preference value for colored text
ORANGE is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%ORANGE% orange text %ENDCOLOR%
- Expands to: orange text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
P -- pencil icon
PINK -- preference value for colored text
PINK is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%PINK% pink text %ENDCOLOR%
- Expands to: pink text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
PLUGINDESCRIPTIONS -- list of plugin descriptions
- Syntax:
%PLUGINDESCRIPTIONS%
- Expands to:
- TWiki Compatibility Plugin (1.1.2, $Rev: 13315 (2011-12-06) $): Add TWiki personality to Foswiki
- Spread Sheet Plugin (1.1.4, $Rev: 13315 (2011-12-06) $): Add spreadsheet calculations like "$SUM($ABOVE())" to Foswiki tables and other topic text
- Adverts Plugin (Dakar, 6827): This plugin provides a convenient interface to the functionality in PhpAdsNew
- Auto View Template Plugin (10 Apr 2011, $Rev: 11364 (2011-04-10) $): Automatically sets VIEW_TEMPLATE and EDIT_TEMPLATE
- Calendar Plugin (2.000, $Rev: 8058 (2010-07-07) $): Show a monthly calendar with highlighted events
- Comment Plugin (10 Apr 2011, $Rev: 11361 (2011-04-10) $): Quickly post comments to a page without an edit/save cycle
- Compare Revisions Addon Plugin (1.1.6, $Rev: 13317 (2011-12-06) $):
- Edit Table Plugin (4.41, $Rev: 13315 (2011-12-06) $): Edit tables using edit fields, date pickers and drop down boxes
- Embed Plugin (Dakar, 6827): Embeds MediaPlayer files in a TWiki page
- Google Analytics Plugin (2.1.1, 4729): Adds Google Analytics javascript code to specified pages
- History Plugin (1.10, $Rev: 13288 (2011-12-03) $): Shows a complete history of a topic
- Image Gallery Plugin (6.00, $Rev: 11854 (2011-06-06) $): Displays image gallery with auto-generated thumbnails from attachments
- Interwiki Plugin (1.1.2, $Rev: 12957 (2011-10-31) $): Link ExternalSite:Page text to external sites based on aliases defined in a rules topic
- JQuery Plugin (4.32, $Rev: 13479 (2011-12-20) $): jQuery JavaScript library for Foswiki
- Mailer Contrib Plugin (9 Jul 2010, $Rev: 13315 (2011-12-06) $): Supports e-mail notification of changes
- Preferences Plugin (1.1.2, $Rev: 13315 (2011-12-06) $): Allows editing of preferences using fields predefined in a form
- Redirect Plugin (1.1, $Rev: 7923 (2010-06-26) $): Create a redirect to another topic or website.
- Render List Plugin (2.2.5, $Rev: 13315 (2011-12-06) $): Render bullet lists in a variety of formats
- Slide Show Plugin (2.1.4, $Rev: 12410 (2011-08-28) $): Create web based presentations based on topics with headings
- Smilies Plugin (05 Dec 2011, $Rev: 13315 (2011-12-06) $): Render smilies like
as icons - Spaced Wiki Word Plugin (1.0.1, $Rev: 9953 (2010-11-11) $): Display topic links spaced out
- Table Plugin (1.138, $Rev: 13401 (2011-12-13) $): Control attributes of tables and sorting of table columns
- Tiny MCEPlugin (1.1.12, $Rev: 13315 (2011-12-06) $): Integration of the Tiny MCE WYSIWYG Editor
- Twisty Plugin (1.6.15, $Rev: 13315 (2011-12-06) $): Twisty section Javascript library to open/close content dynamically
- Wysiwyg Plugin (1.1.3, $Rev: 13315 (2011-12-06) $): Translator framework for WYSIWYG editors
- Related: ACTIVATEDPLUGINS, FAILEDPLUGINS, PLUGINVERSION
PLUGINVERSION -- the version of a TWiki Plugin, or the TWiki Plugins API
- Syntax:
%PLUGINVERSION{"name"}% to get the version of a specific plugin
- Example:
%PLUGINVERSION{"InterwikiPlugin"}% expands to $Rev: 12957 (2011-10-31) $
- Syntax:
%PLUGINVERSION% to get the version of the API
- Expands to:
2.1
- Related: WIKIVERSION, ACTIVATEDPLUGINS, FAILEDPLUGINS, PLUGINDESCRIPTIONS
PREVIEWBGIMAGE -- preview background image
PUBURL -- the base URL of attachments
PUBURLPATH -- the base URL path of attachments
PURPLE -- preference value for colored text
PURPLE is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%PURPLE% purple text %ENDCOLOR%
- Expands to: purple text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
Q -- question icon
QUERYSTRING -- full, unprocessed string of parameters to this URL
- String of all the URL parameters that were on the URL used to get to the current page. For example, if you add ?name=Samantha;age=24;eyes=blue to this URL you can see this in action. This string can be appended to a URL to pass parameter values on to another page.
-
Note: URLs built this way are typically restricted in length, typically to 2048 characters. If you need more space than this, you will need to use an HTML form and %URLPARAM{}%.
- Syntax:
%QUERYSTRING%
- Expands to:
- Related: URLPARAM
RED -- preference value for colored text
RED is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%RED% red text %ENDCOLOR%
- Expands to: red text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
REMOTE_ADDR -- environment variable
REMOTE_PORT -- environment variable
REMOTE_USER -- environment variable
REVINFO -- revision information of current topic
REVINFO{"format"} -- formatted revision information of topic
- Syntax:
%REVINFO{"format"}%
- Supported parameters:
| Parameter: | Description: | Default: |
"format" | Format of revision information, see supported variables below | "r1.$rev - $date - $wikiusername" |
web="..." | Name of web | Current web |
topic="..." | Topic name | Current topic |
rev="1.5" | Specific revison number | Latest revision |
- Supported variables in format:
| Variable: | Unit: | Example |
$web | Name of web | Current web |
$topic | Topic name | Current topic |
$rev | Revison number. Prefix r1. to get the usual r1.5 format | 5 |
$date | Revision date | 11 Jul 2004 |
$time | Revision time | 23:24:25 |
$username | Login username of revision | jsmith |
$wikiname | Wiki Name of revision | JohnSmith |
$wikiusername | WikiName with Main web prefix | Main.JohnSmith |
- Example:
%REVINFO{"$date - $wikiusername" rev="1.1"}% returns revision info of first revision
- Related: REVINFO
S -- red star icon
SCRIPTNAME -- name of current script
- The name of the current script is shown, including script suffix, if any (for example
viewauth.cgi)
- Syntax:
%SCRIPTNAME%
- Expands to:
view
- Related: SCRIPTSUFFIX, SCRIPTURL, SCRIPTURLPATH
SCRIPTSUFFIX -- script suffix
- Some Foswiki installations require a file extension for CGI scripts, such as
.pl or .cgi
- Syntax:
%SCRIPTSUFFIX%
- Expands to:
- Related: SCRIPTNAME, SCRIPTURL, SCRIPTURLPATH
SCRIPTURL -- base URL of TWiki scripts
SCRIPTURL{"script"} -- URL of TWiki script
- Syntax:
%SCRIPTURL{"script"}%
- Expands to:
http://www.redbourn.org.uk/bin/script
- Example: To get the authenticated version of the current topic you can write
%SCRIPTURL{"viewauth"}%/%WEB%/%TOPIC% which expands to http://www.redbourn.org.uk/bin/viewauth/TWiki/TWikiVariables
-
Note: In most cases you should use %SCRIPTURLPATH{"script"}% instead, as it works with URL rewriting much better
- Related: PUBURL, SCRIPTNAME, SCRIPTSUFFIX, SCRIPTURL, SCRIPTURLPATH, SCRIPTURLPATH{"script"}
SCRIPTURLPATH -- base URL path of TWiki scripts
SCRIPTURLPATH{"script"} -- URL path of TWiki script
SEARCH{"text"} -- search content
- Inline search, shows a search result embedded in a topic
- Syntax:
%SEARCH{"text" ...}%
- Supported parameters:
| Parameter: | Description: | Default: |
"text" | Search term. Is a keyword search, literal search or regular expression search, depending on the type parameter. Search Help has more | required |
search="text" | (Alternative to above) | N/A |
web="Name" web="Main, Know" web="all" | Comma-separated list of webs to search. You can specifically exclude webs from an all search using a minus sign - for example, web="all,-Secretweb". The special word all means all webs that do not have the NOSEARCHALL variable set to on in their Web Preferences. Note that TWiki Access Controls? are respected when searching webs; it is much better to use them than NOSEARCHALL. | Current web |
topic="WebPreferences" topic="*Bug" | Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. Note this is a list of topic names and must not include web names. | All topics in a web |
excludetopic="Web*" excludetopic="WebHome, WebChanges" | Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. Note this is a list of topic names and must not include web names. | None |
type="keyword" type="literal" type="regex" | Do a keyword search like soap "web service" -shampoo; a literal search like web service; or Regular Expression search like soap;web service;!shampoo | %SEARCHVAR- DEFAULTTYPE% preferences setting (literal) |
scope="topic" scope="text" scope="all" | Search topic name (title); the text (body) of topic; or all (both) | "text" |
order="topic" order="created" order="modified" order="editby" order= "formfield(name)" | Sort the results of search by the topic names, topic creation time, last modified time, last editor, or named field of TWiki Forms. The sorting is done web by web; if you want to sort across webs, create a formatted table and sort it with Table Plugin's initsort. Note that dates are sorted most recent date last (i.e at the bottom of the table). | Sort by topic name |
limit="all" limit="16" | Limit the number of results returned. This is done after sorting if order is specified | All results |
date="..." | limits the results to those pages with latest edit time in the given Time Interval. | All results |
reverse="on" | Reverse the direction of the search | Ascending search |
casesensitive="on" | Case sensitive search | Ignore case |
bookview="on" | Book View search, e.g. show complete topic text | Show topic summary |
nonoise="on" | Shorthand for nosummary="on" nosearch="on" nototal="on" zeroresults="off" noheader="on" noempty="on" | Off |
nosummary="on" | Show topic title only | Show topic summary |
nosearch="on" | Suppress search string | Show search string |
noheader="on" | Suppress search header Topics: Changed: By: | Show search header, unless seach is inline and a format is specified (Cairo compatibility) |
nototal="on" | Do not show number of topics found | Show number |
zeroresults="off" | Suppress all output if there are no hits | zeroresults="on", displays: "Number of topics: 0" |
noempty="on" | Suppress results for webs that have no hits. | Show webs with no hits |
header="..." format="..." | Custom format results: see Formatted Search for usage, variables & examples | Results in table |
expandvariables="on" | Expand variables before applying a Formatted Search on a search hit. Useful to show the expanded text, e.g. to show the result of a Spread Sheet Plugin %CALC{}% instead of the formula | Raw text |
multiple="on" | Multiple hits per topic. Each hit can be formatted. The last token is used in case of a regular expression ";" and search | Only one hit per topic |
nofinalnewline="on" | If on, the search variable does not end in a line by itself. Any text continuing immediately after the search variable on the same line will be rendered as part of the table generated by the search, if appropriate. | off |
recurse="on" | Recurse into subwebs, if subwebs are enabled. | off |
separator=", " | Line separator between hits | Newline "$n" |
- Example:
%SEARCH{"wiki" web="Main" scope="topic"}%
- Example with format:
%SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"% (displays results in a table with header - details)
-
Hint: If the TWiki:Plugins.TablePlugin is installed, you may set a %TABLE{}% variable just before the %SEARCH{}% to alter the output of a search. Example: %TABLE{ tablewidth="90%" }%
- Related: METASEARCH, TOPICLIST, WEBLIST, Formatted Search
SEARCHDEFAULTTTYPE -- default type for search
Default type for search, one of:
keyword (for search engine like
syntax),
regex (for
Regular Expression search), or
literal (for
verbatim search). Note that the variable name has three consecutive 'T'.
This is a typo and
ought to be fixed, but at the moment that is the
name the code is using and maybe a couple of installations have been
using it for customisation.
SEARCHSTOPWORDS -- words to exclude from search
Stop words, e.g., common words and characters to exclude from a keyword search
- Type: Preference variable defined in TWiki.Default Preferences. Can be customized for a TWiki site in Main.Site Preferences, and for each web in their Web Preferences topics.
- Current value: SEARCHSTOPWORDS = a, all, am, an, and, any, as, at, b, be, by, c, d, e, for, from, g, h, how, i, i'm, i.e., in, is, isn't, it, it's, its, j, k, l, m, n, o, of, on, or, p, q, r, s, t, that, that's, the, this, to, u, v, w, was, wasn't, what, what's, when, where, who, who's, will, with, x, y, z
SEARCHVARDEFAULTTYPE -- default type for search
Default type for search by
%SEARCH{}% variable, one of: keyword (for search engine like syntax), regex (for
Regular Expression search), or literal (for verbatim search)
SERVERTIME -- server time
SERVERTIME{"format"} -- formatted server time
- Same format qualifiers as
%GMTIME%
- Syntax:
%SERVERTIME{"format"}%
- Example:
%SERVERTIME{"$hou:$min"}% expands to 20:03
-
Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWiki Templates#Template Topics Vars for details.
- Related: DISPLAYTIME, GMTIME, SERVERTIME
SESSIONID -- unique ID for this session
SESSIONVAR -- name of CGI and session variable that stores the session ID
SESSION_VARIABLE -- get, set or clear a session variable
SILVER -- preference value for colored text
SILVER is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%SILVER% silver text %ENDCOLOR%
- Expands to: silver text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
SITEMAPLIST, SITEMAPWHAT, SITEMAPUSETO -- control TWiki.Site Map appearance
The variables SITEMAPLIST, SITEMAPWHAT, and SITEMAPUSETO together
control the appearance of the
SiteMap. They
are initialized when a web is created (see
Managing Webs),
stored in the
Web Preferences topic of each web and used only in the
SiteMap.
SKIN -- how your Foswiki looks like
Skin overriding the default TWiki templates. See
TWiki Skin Browser for currently installed skins.
SPACEDTOPIC -- topic name, spaced and URL-encoded deprecated
- The current topic name with added URL-encoded spaces, for use in regular expressions that search for backlinks to the current topic
- Syntax:
%SPACEDTOPIC%
- Expands to:
Var%20*SPACEDTOPIC
-
Note: This is a deprecated variable. It can be duplicated with %ENCODE{%SPACEOUT{"%TOPIC%" separator=" *"}%}%
- Related: SPACEOUT, TOPIC, ENCODE
SPACEOUT{"string"} -- renders string with spaces inserted in sensible places
- Inserts spaces after lower case letters that are followed by a digit or a capital letter, and after digits that are followed by a capital letter.
- Useful for spacing out Wiki Words
- Syntax:
%SPACEOUT{ "%TOPIC%" }%
- Expands to:
TWiki Variables
- Supported parameters:
| Parameter: | Description: | Default: |
separator | The separator to put between words e.g. %SPACEOUT{"DogsCatsBudgies" separator=", "}% -> Dogs, Cats, Budgies | ' ' |
-
Hint: Spaced out WikiWords are not automatically linked. To SPACEOUT a WikiWord but preserve the link use "double bracket" format. For example, [[WebHome][%SPACEOUT{"WebHome"}%]] expands to Web Home
- Related: SPACEDTOPIC, $PROPERSPACE() of Spread Sheet Plugin
STARTINCLUDE -- start position of topic text if included
- If present in included topic, start to include text from this location up to the end, or up to the location of the
%STOPINCLUDE% variable. A normal view of the topic shows everything exept the %STARTINCLUDE% variable itself.
- Note: If you want more than one part of the topic included, use
%STARTSECTION{type="include"}% instead
- Syntax:
%STARTINCLUDE%
- Related: INCLUDE, STARTSECTION, STOPINCLUDE
STARTSECTION -- marks the start of a section within a topic
- Section boundaries are defined with
%STARTSECTION{}% and %ENDSECTION{}%.
- Sections may be given a name to help identify them, and/or a type, which changes how they are used.
-
type="section" - the default, used for a generic section, such as a named section used by INCLUDE.
-
type="include" - like %STARTINCLUDE% ... %STOPINCLUDE% except that you can have as many include blocks as you want (%STARTINCLUDE% is restricted to only one).
-
type="templateonly" - start position of text to be removed when a template topic is used. This is used to embed text that you do not want expanded when a new topic based on the template topic is created. See TWiki Templates for more information.
- Syntax:
%STARTSECTION{"name"}% ................ %ENDSECTION{"name"}%
- Syntax:
%STARTSECTION{type="include"}% ........ %ENDSECTION{type="include"}%
- Syntax:
%STARTSECTION{type="templateonly"}% ... %ENDSECTION{type="templateonly"}%
- Supported parameters:
| Parameter: | Description: | Default |
"name" | Name of the section. Must be unique inside a topic. | Generated name |
type="..." | Type of the section; type "section", "include" or "templateonly" | "section" |
-
Note: If a section is not given a name, it will be assigned one. Unnamed sections are assigned names starting with _SECTION0 for the first unnamed section in the topic, _SECTION1 for the second, etc..
-
Note: You can define nested sections. It is not recommended to overlap sections, although it is valid in TWiki. Use named sections to make sure that the correct START and ENDs are matched. Section markers are not displayed when a topic is viewed.
- Related: ENDSECTION, INCLUDE, NOP, STARTINCLUDE, STOPINCLUDE
STATISTICSTOPIC -- name of statistics topic
STOPINCLUDE -- end position of topic text if included
- If present in included topic, stop to include text at this location and ignore the remaining text. A normal view of the topic shows everyting exept the
%STOPINCLUDE% variable itself.
- Syntax:
%STOPINCLUDE%
- Related: INCLUDE, STARTINCLUDE
T -- tip icon
TEAL -- preference value for colored text
TEAL is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%TEAL% teal text %ENDCOLOR%
- Expands to: teal text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
TOC -- table of contents of current topic
TOC{"Topic"} -- table of contents
- Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in Wiki Syntax (
"---++ text") and HTML ("<h2>text</h2>") are taken into account. Any heading text after "!!" is excluded from the TOC; for example, write "---+!! text" if you do not want to list a header in the TOC
- Syntax:
%TOC{"SomeTopic" ...}%
- Supported parameters:
| Parameter: | Description: | Default: |
"TopicName" | topic name | Current topic |
web="Name" | Name of web | Current web |
depth="2" | Limit depth of headings shown in TOC | 6 |
title="Some text" | Title to appear at top of TOC | none |
- Example:
%TOC{depth="2"}%
- Example:
%TOC{"TWikiDocumentation" web="TWiki" title="Contents:"}%
- Example: see TWiki:Sandbox.TestTopicInclude
-
Hint: TOC will generate links to the headings, so when a reader clicks on a heading it will jump straight where that heading is anchored in the text. If you have two headings with exactly the same text, then their anchors will also be identical and they won't be able to jump to them. To make the anchors unique, you can add an invisible HTML comment to the text of the heading. This will be hidden in normal view, but will force the anchors to be different. For example, ---+ Heading <!--5-->.
- Related: TOC
TOPIC -- name of current topic
TOPICLIST{"format"} -- topic index of a web
- List of all topics in a web. The "format" defines the format of one topic item. It may include variables: The
$name variable gets expanded to the topic name, $qname to double quoted name, $marker to marker parameter where topic matches selection, and $web to the name of the web.
- Syntax:
%TOPICLIST{"format" ...}%
- Supported parameters:
| Parameter: | Description: | Default: |
"format" | Format of one line, may include $web (name of web), $name (name of the topic), $qname (name of topic in double quotes), $marker (which expands to marker for the item matching selection only) | "$name" |
format="format" | (Alternative to above) | "$name" |
separator=", " | line separator | "$n" (new line) |
marker="selected" | Text for $marker if the item matches selection | "selected" |
selection="TopicA, TopicB" | Current value to be selected in list | (none) |
web="Name" | Name of web | Current web |
- Example:
%TOPICLIST{" * $web.$name"}% creates a bullet list of all topics
- Example:
%TOPICLIST{separator=", "}% creates a comma separated list of all topics
- Example:
%TOPICLIST{" <option>$name</option>"}% creates an option list (for drop down menus)
- Example:
<select>%TOPICLIST{" <option $marker value='$name'>$name</option>" separator=" " selection="%TOPIC%"}%</select> creates an option list of web topics with the current topic selected
- Related: SEARCH, WEBLIST
TOPICURL -- shortcut to viewing the current topic
This variable always expands to an url pointing to the current base
topic.
TWIKICOLORSURL -- location of custom colors style sheet
Location of the colors style sheet, for use in a skin.
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Current value: TWIKICOLORSURL = %TWIKICOLORSURL%
TWIKILAYOUTURL -- location of layout style sheet
Location of the layout style sheet, for use in a skin.
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Type: Preference variable defined in TWiki.Default Preferences. Can be customized for a TWiki site in Main.Site Preferences, and for each web in their Web Preferences topics.
- Current value: TWIKILAYOUTURL = %TWIKILAYOUTURL%
TWIKISTYLEURL -- location of styles style sheet
Location of the styles style sheet, for use in a skin.
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Current value: TWIKISTYLEURL = %TWIKISTYLEURL%
TWIKIWEB -- name of TWiki documentation web
- The web containing all documentation and site-wide preference settings for Foswiki
- Syntax:
%TWIKIWEB%
- Expands to:
TWiki
- Related: MAINWEB
U -- "updated" icon
URLPARAM{"name"} -- get value of a URL parameter
- Returns the value of a URL parameter.
- Syntax:
%URLPARAM{"name"}%
- Supported parameters:
| Parameter: | Description: | Default: |
"name" | The name of a URL parameter | required |
default="..." | Default value in case parameter is empty or missing | empty string |
newline="<br />" | Convert newlines in textarea to other delimiters | no conversion |
encode="entity" | Encode special characters into HTML entities. See ENCODE for more details. | no encoding |
encode="url" | Encode special characters for URL parameter use, like a double quote into %22 | no encoding |
multiple="on" multiple="[[$item]]" | If set, gets all selected elements of a <select multiple="multiple"> tag. A format can be specified, with $item indicating the element, e.g. multiple="Option: $item" | first element |
separator=", " | Separator between multiple selections. Only relevant if multiple is specified | "\n" (new line) |
- Example:
%URLPARAM{"skin"}% returns print for a .../view/TWiki/TWikiVariables?skin=print URL
-
Note: URL parameters passed into HTML form fields must be entity ENCODEd
-
Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWiki Templates#Template Topics Vars for details.
-
Note: There is a risk that this variable could be misused for cross-site scripting.
- Related: ENCODE, SEARCH, Formatted Search, QUERYSTRING
USERCOLORSURL -- location of custom colors style sheet
Location of the custom colors style sheet, for overriding colors in a skin.
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Type: Preference variable defined in TWiki.Default Preferences. Can be customized for a TWiki site in Main.Site Preferences, and for each web in their Web Preferences topics.
- Current value: USERCOLORSURL = /pub/Main/RedbournTheme/colors.css
USERINFO - retrieve details about a user (by default the logged-in user)
- Syntax:
%USERINFO%
- Expands to: =guest, Wiki Guest, =
To format that information differently:
- Syntax:
%USERINFO{format="$username is really $wikiname"}%
- Expands to:
guest is really WikiGuest.
- The tokens
$emails, $username, $wikiname, $wikiusername, and $groups are available for use in the format string .By default, the info will be formatted as a comma-separated list of the username, wikiusername, and emails.
To get information about another user:
- Syntax:
%USERINFO{"TWikiGuest" format="$username is really $wikiname"}%
- Expands to:
- The parameter should be the wikiname of a user. You can only get information about another user if the
{AntiSpam}{HideUserDetails} configuration option is not enabled, or if you are an admin. (User details are hidden in this TWiki)
USERLAYOUTURL -- location of custom layout style sheet
Location of the custom layout style sheet, for overriding layout
elements in a skin.
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Type: Preference variable defined in TWiki.Default Preferences. Can be customized for a TWiki site in Main.Site Preferences, and for each web in their Web Preferences topics.
- Current value: USERLAYOUTURL = /pub/Main/RedbournTheme/layout.css
USERNAME -- your login username
USERSTYLEURL -- location of custom styles style sheet
Location of the custom styles style sheet, for overriding styles in a skin.
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Type: Preference variable defined in TWiki.Default Preferences. Can be customized for a TWiki site in Main.Site Preferences, and for each web in their Web Preferences topics.
- Current value: USERSTYLEURL = /pub/Main/RedbournTheme/style.css
VAR{"NAME" web="Web"} -- get a preference value from another web
- Syntax:
%VAR{"NAME" web="Web"}%
- Example: To get
%WEBBGCOLOR% of the Main web write %VAR{"WEBBGCOLOR" web="Main"}%, which expands to #FFEFA6
- Related: WEBPREFSTOPIC
WEB -- name of current web
WEBBGCOLOR -- background color for a web
This variable can be used in skin templates or style declarations to
provide a background color in standard HTML/CSS syntax ('#' followed
by six hex digits).
When creating a new web this variable can be set.
WEBCOPYRIGHT -- shortcut for a web's copyright message
This variable can be used as a simple shortcut for a copyright message.
WEBFORMS -- list of forms which can be used
A comma separated list of
forms that can be attached to topics in a
web. Usually defined in a
Web Preferences topic.
WEBHEADERART, WEBHEADERBGCOLOR -- header art
Location of an image and background color for the header, for use in a skin.
- Usage: Evaluated by TWiki skins/templates and not intended to be expanded in any topic.
- Type: Preference variable defined in TWiki.Default Preferences. Can be customized for a TWiki site in Main.Site Preferences, and for each web in their Web Preferences topics.
- Current value: WEBHEADERART = /pub/TWiki/WebPreferences/Dakar.gif
- Current value: WEBHEADERBGCOLOR = #ffffff
WEBLIST{"format"} -- index of all webs
- List of all webs. Obfusticated 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.
- Syntax:
%WEBLIST{"format" ...}%
- Supported parameters:
| Parameter: | Description: | Default: |
"format" | Format of one line, may include $name (the name of the web), $qname (the name of the web in double quotes), $indentedname (the name of the web with parent web names replaced by indents, for use in indented lists), and $marker (which expands to marker for the item matching selection only) | "$name" |
format="format" | (Alternative to above) | "$name" |
separator=", " | line separator | "$n" (new line) |
webs="public" | comma separated list of webs, public expands to all non-hidden | "public" |
marker="selected" | Text for $marker if the item matches selection | "selected" |
selection="%WEB%" | Current value to be selected in list | section="%WEB%" |
- Example:
%WEBLIST{" * [[$name.WebHome]]"}% creates a bullet list of all webs.
- Example:
%WEBLIST{"<option $marker value=$qname>$name</option>" webs="Trash, public" selection="TWiki" separator=" "}% creates a dropdown of all public webs + Trash web, with the current web highlighted.
- Related: TOPICLIST, SEARCH
WEBLOGOIMG, WEBLOGOURL, WEBLOGOALT -- default web logo image
The variables WEBLOGOIMG, WEBLOGOURL, and WEBLOGOALT together define a
logo.
WEBPREFSTOPIC -- name of web preferences topic
WEBRSSCOPYRIGHT -- shortcut for a web's RSS copyright message
This variable can be used as a simple shortcut for a copyright message
to be used in RSS. Don't use any special characters, html tags, entities, wiki markup or
Wiki Words.
WEBTOPICLIST -- standard navigation links
This variable is intended to be used in skin templates to provide a
set of standard navigation links.
WHITE -- preference value for colored text
WHITE is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%WHITE% white text %ENDCOLOR%
- Expands to: white text (shown with a gray background here)
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
WIKIHOMEURL -- site home URL deprecated
WIKILOGOIMG, WIKILOGOURL, WIKILOGOALT -- installation logo image
Image, URL and alternate tooltip text of the logo
for this installation: you should change these settings for your site, or they can be overwridden in WebPreferences for individual webs by defining these variables there.
logo.
WIKINAME -- your Wiki username
WIKIPREFSTOPIC -- name of site-wide preferences topic
WIKITOOLNAME -- name of your TWiki site
WIKIUSERNAME -- your Wiki username with web prefix
WIKIUSERSTOPIC -- name of topic listing all registers users
WIKIVERSION -- the version of the installed TWiki engine
WIKIWEBLIST -- static list of webs
List of Foswiki webs - on the first line of the upper toolbar (to add a new web, see
Managing Webs and
Site Map)
WIKIWEBMASTER, WIKIWEBMASTERNAME -- web master address and name
TWiki administrator e-mail address and name. Will be used for sending mails,
so it is required to change the distribution default during
installation by providing a correct value in
Main.Site Preferences.
X -- warning icon
Y -- "yes" icon
YELLOW -- preference value for colored text
YELLOW is one of the rendering shortcut settings
predefined in
TWiki Preferences. See the section
Rendering Shortcut Settings
in that topic for a complete list of colors.
- Syntax:
%YELLOW% yellow text %ENDCOLOR%
- Expands to: yellow text
- Note:
%<color>% text must end with %ENDCOLOR%. If you want to switch from one color to another one you first need to end the active color with %ENDCOLOR%, e.g. write %RED% some text %ENDCOLOR% %GREEN% more text %ENDCOLOR%.
- Related: ENDCOLOR, TWikiPreferences, Standard Colors
Related Topics: User Documentation Category