%CALC{formula}% variable is handled by the SpreadSheetPlugin. Over 100 functions are available, such as $ABS(), $EXACT(), $EXISTS(), $GET()/$SET(), $IF(), $LOG(), $LOWER(), $PERCENTILE(), $TIME(), $VALUE().
%CALC{formula}%
%CALC{$SUM($ABOVE())}% returns the sum of all cells above the current cell
%CALC{$EXISTS(Web.SomeTopic)}% returns 1 if the topic exists
%CALC{$UPPER(Collaboration)}% returns COLLABORATION
%INCLUDE{%CALC{...}%}%) because it does not get evaluated inside-out & left-to-right like ordinary TWiki variables. Use CALCULATE if you nest variables.
%CALCULATE{formula}% variable is handled by the SpreadSheetPlugin. Over 100 functions are available, such as $ABS(), $EXACT(), $EXISTS(), $GET()/$SET(), $IF(), $LOG(), $LOWER(), $PERCENTILE(), $TIME(), $VALUE().
%CALC{formula}%
%CALC{$EXISTS(Web.SomeTopic)}% returns 1 if the topic exists
%CALC{$UPPER(Collaboration)}% returns COLLABORATION
$LEFT() or $T(). Use CALC instead.
%DASHBOARD{...}% variable.
%DASHBOARD{ section="..." ... }%
%DASHBOARD{ section="dashboard_start" }% %DASHBOARD{ section="banner" image="..." title="..." }% %DASHBOARD{ section="box_start" title="Box 1 title" }% Box 1 content %DASHBOARD{ section="box_end" }% %DASHBOARD{ section="box_start" title="Box 2 title" }% Box 2 content %DASHBOARD{ section="box_end" }% ... %DASHBOARD{ section="dashboard_end" }%
SEARCH{...}.
%DATATBL{ "topic" format="..." separator="..." }%
| Parameter | Description | Default |
|---|---|---|
"topics" | comma separated topics whose first table is looked up. If multiple topics are specified, tables on the topics are combined and hanled as if there is one big table | |
"escaped_variable" | Instead of comma separated topics, you can specify an escaped TWiki variable such as $percntINCLUDE{\"http://foo/bar\"}$percnt. Then the variable is expanded and the result becomes the data soruce. Read Getting table data dynamically for more information | |
assumedcols="COLUMNS" | causes COLUMNS to be assumed. Read Referring to non-existent columns for more information | |
evalcell="on" | causes variable expansion in table data. Read Expand variables in cells for more information | off |
COLUMN_NAME="VALUES" | select rows whose COLUMN_NAME column has either of comma separated VALUES. Read Select rows for more information | |
by="COLUMN_NAME" value="VALUES" | Same as above. But if COLUMN_NAME starts with a lower case letter, this format needs to be used | |
ignorenull="on" | causes null result to resort to ifnomatch value. Read Treat null value as no match for more information | off |
ignorecase="on" | causes string comparison to case insensitive | off |
sort="COLUMN" sorta="COLUMN" sortn="COLUMN" | sorts the output chunks based on a source table column. sort is for case-sensitive string sort, sorta is for case-insensitive (alphabetical) string sort, and sortn is for numeric sort. The sorting result is in the ascending order. To get the decending order, specify reverse="on" in addition | no sorting |
reverse="on" | specifies the order of output chunks to be reversed. If combined with sort="COLUMN", output chunks are sorted in the descending order | |
limit="NUMBER" | specifies the maximum number of rows selected | no limit |
transposed="on" | species that the topics have transposed tables - the first column has field names and the second column has field values. Read Transposed tables for more information | off |
split="SPLIT_PATTERN" | may be used when transposed="on" (above) is specified. It specifies a pattern to split tables even within a table | |
trfrom="SEARCH_LIST" trto="REPLACE_LIST" tropt="OPTIONS" | causes transliteration in the result. Read Transliteration for more information | |
format="..." | specifies the format of each output chunk corresponding a selected source table row. Read Format parameter for more information | $Name |
separator="..." | specifies a separator between output chunks. This is the same as the separator parameter of SEARCH{...} | (null string) |
separatorN="..." | specifies a separator inserted every N output chunks. Read Different separators at different places for more information | |
ifnomatch="STRING" | causes the STRING to be yielded when there is no matching row. Read When there is no match for more information |
%DOXYGENIMPORT{}% variable is handled by the DoxygenImportPlugin - see plugin for details
%DOXYGENIMPORT{"import"}% - show form to import Doxygen archive file
%DOXYGENIMPORT{"navigation"}% - show navigation of the base page
%EJS_INCLUDE{"ComponentTopicName" namespace="NamespaceRequiredByComponent" timeout="TimeoutInSeconds"}%
%EXAMPLEVAR{}% variable is handled by the EmptyPlugin
%EXAMPLEVAR{"text" format="..."}%
text="..." - example text.
format="..." - format of report.
%EXAMPLEVAR{"hello" format="| $topic: $summary |"}%
%EXECUTE{}% variable to safely execute shell scripts. The variable is handled by the ExecutePlugin - see plugin for details on how to configure external scripts so that they can be used in %EXECUTE{}%.
%EXECUTE{ "script" ... }%
| Parameter | Explanation | Default | Example |
|---|---|---|---|
"name" | Name of script to execute, as defined in configure. See ExecutePlugin for details. | (none) | "test-results" |
format="..." | Format each line of the script output. The token $text expands to the text of a line. Additional FormatTokens can be used, such as $percnt for the percent sign. | "$text" | format="| $text |" |
newline="..." | Change newlines of the script output to something else. FormatTokens can be used, such as $n for newline. | "$n" | newline=", " |
...="..." | Any other parameter can be used as parameter to the script. | (none) | date="2026-02-10" |
%EXECUTE{ "qa_results" date="%URLPARAM{date}%" }%
%GEOLOOKUP{}% variable is handled by the GeoLookupPlugin
%GEOLOOKUP{"host" format="..."}%
| Parameter | Description | Default |
|---|---|---|
"..." | Host IP address or host name | none, required |
format="..." | Format of geolocation. Supported variables: • $latitude: Latitude • $longitude: Longitude • $city: City name • $region: Region name • $country_name: Country name • $country_code: Two letter country code • $postal_code: Postal code (USA only) • $metro_code: Metropolitan code• $area_code: Telephone area code (USA only) | "$city, $region, $country_name" |
%GEOLOOKUP{"75.52.124.86"}% shows default format (city, region, country code)
%GEOLOOKUP{"75.52.124.86" format="$latitude, $longitude"}% shows comma separated Latitude and Longitude
%SET{}%. The %SET{}% and %GET{}% variables are handled by the SetGetPlugin.
%GET{ "name" default="..." }%
| Parameter | Description | Default |
|---|---|---|
"name" | Name of variable, such as menu. May optionally contain a JSON path, such as menu.File.Open. | (required) |
format="..." | Format with supported variables: • $name for variable name • $value for variable value • $isdefined expanding to 1 or 0 depending if variable is defined or not • $isset expanding to 1 or 0 depending if variable is logically true or false • $ispersistent expanding to 1 or 0 depending if variable is persistent or not • all FormatTokens such as $dollar, $n, $percnt. | "$value" |
default="..." | Text shown if variable is not defined, e.g. not found. This parameter overrides the format parameter. | "" (empty string) |
store="..." | Specify a store name that holds the persistent variable. This assumes the variable was previously set with the same store name. | "" |
%GET{"lunch"}% returns Sushi if the following has been previously set:%SET{ "lunch" value="Sushi" }% - see more examples
%GET{ name }% - see description.
%SET{ menu = { "File": { "New": [ "new", "F" ], "Open": [ "open", "F" ] }, "Edit": { "Copy": [ "cpy", "F" ], "Paste": [ "pst", "F" ] } } }% - set a JSON object
%GET{ menu.File.Open }% - returns: ["open","F"]
%INCLUDEXML{"URL or Topic" records="xpath" fields="xpaths"}%
%INCLUDEXML{"http://example.com/rss" records="item" fields="link, title, description, pubDate"}%
%JIRAREST{}% variable is handled by the JiraRestPlugin.
%JIRAREST{ "..." command="..." }%
| Parameter | Description | Default |
|---|---|---|
"..." oraction="..." | Action to take. This is the REST method: "get" for GET, "put" for PUT, "post" for POST, and "delete" for DELETE method. | "" (no action) |
command="..." | REST command, such as: "/rest/api/2/issue/TEST-1" | (required) |
data="..." | Request body sent with REST call, such as: " { \"id\": \"10009\" } " | (required for put and post actions) |
action2="..." | Conduct a second action after successful execution of the first action. Use this to do multiple REST API calls in one session. No action is taken if there was an error in the first action. In the same way, action3, action4, etc can be executed. | (optional) |
user="..." | User for REST call; default is configure setting {Plugins}{JiraRestPlugin}{User} | (configure setting) |
password="..." | Password for REST call; default is configure setting {Plugins}{JiraRestPlugin}{Password} | (configure setting) |
%JIRAREST{ "get" command="/rest/auth/1/session" }% - see more examples.
<head>.
%JQPLOT%, %JQPLOT{"jqPlot plugin name(s)"}%
%JQPLOT{"barRenderer, pieRenderer"}%
%LDAP{"filter" format="format" ...}%
| Parameter: | Description: | Default: |
|---|---|---|
"uid=joeshmoe" | the LDAP query string | required |
filter="uid=joeshmoe" | (Alternative to above) | N/A |
host="..." | host IP or name to connect to | |
port="..." | port to of the host | |
version="..." | protocol version; possible values: 2,3 | |
ssl="..." | use ssl to bind to the server; possible values 0,1 | |
base="..." | base dn of the (sub)tree to search in; if base is written in brackets (e.g. 'base="(ou=people)"') then it is prepended to the default base | the default base of the LdapContrib |
scope="one" | scope of search; possible values: sub, base, one | sub |
format="..." | format string used to display a database record | $dn |
header="..." | header to prepend the output | no header |
footer="..." | footer to appended to the output | no footer |
sep="..." or separator="..." | separator between database records | $n (new line) |
sort="..." | name of attributes to sort the output | DN |
reverse="on" | reverse the result set; possible values: on, off | off |
limit="100" | maximum number of records to return | no limit |
skip="10" | number of records in the hit set to skip before displaying them | 0 (nothing is skipped) |
required="..." | a comma separated list of LDAP record attributes. If specified, the LDAP query results not having all of the specified attributes are eliminated | nothing is required |
hidenull="on" | wether to hide any output on an empty hit set; possible values: on, off | off |
default="..." | when the LDAP query yields no results, the value of this parameter is returned as the search result instead of null. Naturally, if hidenull is on, default doesn't have any effect | "" (null string) |
clear="..." | comma separated list of attributes to be removed from the output if they are not resolved | nothing is cleared |
header, format and footer format strings may contain the following variables and the standard special tokens: | Variable: | Description: |
|---|---|
$count | the number of hits |
$index | the record number |
$<attr-name> | the value of the record attribute <attr-name> |
%LDAP{"objectClass=posixAccount" format="| $index | $cn | $mail |"}%
?refreshldap=on to update.
| Parameter: | Description: | Default: |
|---|---|---|
format="..." | format string used to display a user record | ordered list of $displayName |
header="..." | header to prepend the output | no header |
footer="..." | footer to appended to the output | no footer |
sep="..." | separator between database records | $n (new line) |
limit="100" | maximum number of records to return | no limit |
skip="10" | number of records in the hit set to skip before displaying them | 0 (nothing is skipped) |
include="..." | regular expression a user's WikiName must match to be included in the output | |
exclude="..." | regular expression a user's WikiName must not match | |
hideunknown="off" | on/off, enable/disable filtering out users that did not log in yet and thus have no home topic (e.g. created by TWiki:Plugins/NewUsersPlugin | on |
header, format and footer format strings may contain the following variables and the standard special tokens: | Variable: | Description: |
|---|---|
$index | the record number |
$wikiName | the user's WikiName |
$loginName | the user's login name |
$displayName | a link pointing to the users home topic in the Main web, if it exists, and '<nop>$wikiName' otherwise |
$emails | the list of all known email addresses |
%LDAPUSERS{limit="10"}%
%LOADAPP{"id" ...}%
| Parameter: | Description: | Default: |
|---|---|---|
"someID" | The ID of the application snippet to include. Example: %LOADAPP{"kbHeader"}% will include the topic KnowledgeBaseHeader from the KB web, assuming the mapping 'kbHeader: KB.KnowledgeBaseHeader' is defined in configure | (required) |
section="name" | Include only the specified named section, as defined in the included topic by the STARTSECTION and ENDSECTION variables. Nothing is shown if the named section does not exists. section="" is equivalent to not specifying a section | "" |
PARAMONE="val 1" | 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 %PARAMONE% and %PARAMTWO% being defined within the included topic. A default value for a variable can be specified in the included topic in case the corresponding parameter is not specified, such as %PARAMONE{ default="..." }% | (optional) |
%PING{}% variable tests if a remote host identified by host name or IP address is reachable via ping command. The variable is handled by the PingPlugin.
%PING{ host="www.google.com" }%
| Attribute | Comment | Default |
|---|---|---|
host="..." | Host name or IP address | (required) |
wait="..." | Time, in seconds, to wait for a ping response | "5" |
format="..." | Format of output. Use the variables $host for the host and $result for the result (1 for success, 0 for failure) | For success: "%GREEN%host%ENDCOLOR%" For failure: "%RED%host%ENDCOLOR%" |
%PING{ host="www.google.com" wait="2" }%
%REPLACETEXT{}% variable is handled by the ReplaceTextPlugin; this variable is typically used in conjunction with a web form
%REPLACETEXT{ action="..." web="..." from="..." to="..." }%
| Parameter | Description | Default |
|---|---|---|
action="..." | Replace action: • "" - no action • "replace" - do replace action based on below parameters, return result message, such as: Replaced FOO with BAR in 2 topics in Sandbox web | "" |
web="..." | Name of web to search and replace text | (current web) |
topic="..." | Expert mode: Limit topics by name: A topic with asterisk wildcards, such as Bug-*, or a list of topics separated by comma | (all topics) |
filter="..." | Expert mode: Limit topics by filtering topic text with a regex filter, optional | (no filter) |
from="..." | Text to search | (none, required) |
to="..." | Replacement text | (none, required) |
search="..." | Expert mode: Use this for more complex replace using regular expression grouping etc; typically supplied via a hidden input field. Use $from to specify the search text entered by the user | "\b$from\b" |
replace="..." | Expert mode: Use this for more complex replace using regular expression grouping etc; typically supplied via a hidden input field. Use $to to specify the replacement text entered by the user, use $1, $2, etc to reference captured groups | "$to" |
dryrun="1" | Do a dry run, e.g. a search only to simulate the replace action | "0" |
showlist="1" | Show the list of topics replaced | "0" |
%SENDMAIL{}% variable is handled by the SendMailPlugin.
%SENDMAIL{ action="send" ... }%
| Parameter | Description | Default |
|---|---|---|
action="" | Only action="send" is supported, it will send an e-mail | "" (no action) |
excludetopic="MyTemplate" | Exclude action for named topic. Typically used in a template topic containing the SENDMAL variable to disable the action when viewing the topic. | "" (no exclude) |
from="admin@example.com" | E-mail address or WikiName of sender. If a WikiName is specified, the registered e-mail of that person is used. Supported tokens: • $webmastername - name of TWiki administrator. • $webmasteremail - e-mail of TWiki administrator. • $username - WikiName of logged in user. • $useremail - e-mail address of the logged in user. Defaults to TWiki administrator. See note on open mail relay. | "$webmastername <$webmasteremail>" |
to="jom@example.com" | To list: Comma-space delimited list of e-mail addresses or WikiNames of adressees. Same tokens supported as in from="". Defaults to TWiki administrator. | "$webmastername <$webmasteremail>" |
cc="jimmy@example.com" | CC list: Comma-space delimited list of e-mails or WikiNames. Same tokens supported as in from="". | "" |
bcc="boss@example.com" | BCC list: Comma-space delimited list of e-mails or WikiNames. Same tokens supported as in from="". | "" |
subject="Any text" | E-mail subject. Text may include TWikiVariables such as %URLPARAM{subject}%, and format tokens such as $n and $percnt. | (help message) |
text="Any text" orplaintext="Any text" | E-mail body in plain text format. Text may include TWikiVariables and format tokens. | (help message) |
htmltext="Any HTML" | E-mail body in HTML format, optional. Text may include TWikiVariables and format tokens. Double quotes need to be escaped, such as <a href=\"http://twiki.org/\">TWiki.org<a>. A MIMEplaintext and htmltext are specified. | "" |
onsuccess="..." | Text shown in place of the SENDMAIL variable on success, default is empty. Text may include TWikiVariables and format tokens. | "" |
onerror="| $error ||" | Error message shown in place of the SENDMAIL variable on error, if any. Text may include TWikiVariables and format tokens. Token $error expands to the error message. | "$error" |
%SENDMAIL{ action="send" to="$username <$useremail>" subject="Status change" text="Status changed to %FORMFIELD{Status}%" }%
%GET{}%. No output is shown, e.g. %SET{}% resolves to an empty string. It is also possible to set a JSON object using a JSON path. The %SET{}% and %GET{}% variables are handled by the SetGetPlugin.
%SET{ "name" value="..." remember="1" }%
| Parameter | Description | Default |
|---|---|---|
"name" | Name of variable. Alphanumeric characters, dashes and underscores can be used. | (required) |
value="..." | Value of variable. Escape double quotes with backslash. | (required, may be empty) |
remember="1" | If set, the variable will be stored persistently so that it can be used later in any TWiki topic. Alternatively use the store parameter. See important notes. | "0" |
store="..." | Specify a store name to persistently store the variable, such as store="Parts". Use alphanumeric characters, dashes and underscores for the name. For better performance, store is preferred over the remember parameter if you need to store a large dataset. See important notes. | "" |
%SET{"lunch" value="Sushi"}% - see more examples.
%SET{ name = { ... } remember="1" }% - see description. remember="1" or store="..." parameter can be appended. If specified, the JSON object will be stored persistently so that it can be used later in any TWiki topic.
%SET{ menu = { "File": { "New": [ "new", "F" ], "Open": [ "open", "F" ] }, "Edit": { "Copy": [ "cpy", "F" ], "Paste": [ "pst", "F" ] } } }% - set a JSON object
%GET{ menu }% - returns: {"File":{"New":["new","F"],"Open":["open","F"]},"Edit":{"Copy":["cpy","F"],"Paste":["pst","F"]}}
%SET{ menu.File.Open[1] = "T" }% - modify a JSON object
%GET{ menu }% - returns: {"File":{"New":["new","F"],"Open":["open","T"]},"Edit":{"Copy":["cpy","F"],"Paste":["pst","F"]}}
%SET{ menu.Edit.Cut = [ "cut", "T" ] }% - add to a JSON object
%GET{ menu }% - returns: {"File":{"New":["new","F"],"Open":["open","T"]},"Edit":{"Copy":["cpy","F"],"Paste":["pst","F"],"Cut":["cut","T"]}}
%SET{}%. The %SETGETDUMP{}%, %SET{}%, and %GET{}% variables are handled by the SetGetPlugin.
%SETGETDUMP{ remember="1" format="..." separator="..." }%
| Parameter | Description | Default |
|---|---|---|
remember="1" | Dump all persistent variables | (volatile variables) |
store="..." | Dump variables of a specific store | (volatile variables) |
format="..." | Format output using variables $name and $value | "name: $name, value: $value <br />" |
separator="..." | String used for separating entries | "\n" |
%SETGETDUMP{"| $name | $value |" separator="$n"}% - see more examples.
%USERREPORT{ action="..." ... }%
| Report | action= | Parameters |
|---|---|---|
| Show a simple list of registered users | "user_list" | search, limit, sort, reverse |
| Show the profile picture image of a user | "profile_picture" | user, height, width, title |
| Show slim, one line height user boxes | "slim_box_start" "slim_box" or "slim_box_list" "slim_box_end" | style user, style users, style none |
| Show small, two line height user boxes | "small_box_start" "small_box" or "small_box_list" "small_box_end" | style user, style users, style none |
| Show users in business card format | "business_card_start" "business_card" or "business_card_list" "business_card_end" | style user, style users, style none |
| Show a selector to pick a user, for use in HTML forms | "select_one_user" | name, selected, users |
| Show rows of checkboxes to select users, for use in HTML forms | "select_users" | name, selected, users, colums, style |
%USERREPORT{ action="user_list" search="jane" limit="5" }%
%VARCACHE{}% variable is handled by the VarCachePlugin.
%VARCACHE{ "24" }%
| Attribute | Comment | Default |
|---|---|---|
"..." orrefresh="..." | Cache refresh period in hours (maximum age of cache) | REFRESH setting |
cachemsg="..." | Message shown when looking at a cached topic. Use $age to indicate the age of cache, $link to indicate the refresh URL | CACHEMSG setting |
updatemsg="..." | Message shown after a cache refresh. Use $link to indicate the refresh URL | UPDATEMSG setting |
%VARCACHE{"168"}% caches the current page for 7 days
<varcache_exclude> ... </varcache_exclude> to exclude sections of a page <varcache_exclude> %SEARCH{...}% </varcache_exclude> runs the search on every page view, regardless of caching
VARCACHE_EXCLUDE_ %VARCACHE_EXCLUDE_WIKIUSERNAME% renders the WIKIUSERNAME variable on every page view, regardless of caching