TWiki Variables » Search » Category: System Information
Variables in this category:
- BASETOPIC -- base topic where an INCLUDE started
- BASEWEB -- base web where an INCLUDE started
- CHILDREN -- find children of a topic
- CONTENTMODE{web="WEB"} -- content mode
- DATE -- signature format date
- DISPLAYTIME -- display date and time
- DISPLAYTIME{"format"} -- formatted display time
- ENV{"varname"} -- inspect the value of an environment variable
- FAILEDPLUGINS -- debugging for plugins that failed to load, and handler list
- HOMETOPIC -- home topic in each web
- HTTP -- get HTTP headers
- HTTP_HOST -- environment variable
- HTTPS -- get HTTPS headers
- INCLUDINGTOPIC -- name of topic that includes current topic
- INCLUDINGWEB -- web that includes current topic
- LANGUAGE -- current user's language
- LANGUAGES -- list available TWiki languages
- LOCALSITEPREFS -- web.topicname of site preferences topic
- MAINWEB -- synonym for USERSWEB
- MDREPO -- retrieve data from metadata repository
- META -- displays meta-data
- METASEARCH -- special search of meta data
- NOTIFYTOPIC -- name of the notify topic
- PARENTTOPIC -- parent of current topic
- PLUGINDESCRIPTIONS -- list of plugin descriptions
- PLUGINVERSION -- the version of a TWiki Plugin, or the TWiki Plugins API
- PUBURL -- the base URL of attachments
- PUBURLPATH -- the base URL path of attachments
- QUERYPARAMS -- show paramaters to the query
- QUERYSTRING -- full, unprocessed string of parameters to this URL
- 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
- 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
- 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
- SITENAME -- the current site name
- SITESTATISTICSTOPIC -- name of site statistics topic
- STATISTICSTOPIC -- name of statistics topic
- SYSTEMWEB -- name of TWiki documentation web
- TOPIC -- name of current topic
- TOPICLIST{"format"} -- topic index of a web
- TOPICTITLE -- title of a topic
- TOPICURL -- shortcut to viewing the current topic
- TWIKIWEB -- synonym for SYSTEMWEB
- URLPARAM{"name"} -- get value of a URL parameter
- USERINFO{"name"} -- retrieve details about a user
- USERNAME -- your login username
- USERSWEB -- name of users web
- VAR{"NAME" ...} -- get a preference value from another web or topic and more
- WEB -- name of current web
- WEBLIST{"format"} -- index of all webs
- WEBPREFSTOPIC -- name of web preferences topic
- WIKIHOMEURL -- site home URL
- WIKILOGOALT -- site logo tooltip message
- WIKILOGOIMG -- site logo image URL
- WIKILOGOURL -- site logo home URL
- 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
- WIKIWEBMASTER -- email address of the administrator
- WIKIWEBMASTERNAME -- name of the administrator
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%
- Example: If topic A includes B, and B includes C, then a
%BASETOPIC%
in topic C is reported as A when looking at topic A, B when looking at topic B, and C when looking at topic C itself. - Category: SystemInformationVariables
- Related: BASEWEB, INCLUDINGTOPIC, INCLUDE, TOPIC (this 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%
- Syntax:
%BASEWEB{format="..."}%
-- see WEB for format documentation - Example: If topic A includes B, and B includes C, then a
%BASEWEB%
in topic C is reported as the web of topic A when looking at topic A, the web of topic B when looking at topic B, and the web of topic C when looking at topic C itself. - Category: SystemInformationVariables
- Related: BASETOPIC, INCLUDINGWEB, INCLUDE, WEB (this topic)
CHILDREN -- find children of a topic
- Find direct children of a topic, as defined by the parent-child relationship between topics.
- To find children recursively (topic tree) use the TreePlugin.
- Syntax:
%CHILDREN{...}%
- Supported parameters:
Parameter: Description: Default: web="%WEB%"
Wiki web. Current web topic="%TOPIC%"
The topic to find the children. Current topic format="..."
Custom format for each topic found. Supports same format strings as SEARCH.
See FormattedSearch for usage, variables & examples"$topic"
separator="..."
Separator between topics. ", "
default="none"
Default text shown if no children found. ""
(empty) - Example:
%CHILDREN{ topic="%TOPIC%" }%
- Category: SearchingAndListingVariables, SystemInformationVariables
- Related: META, PARENTTOPIC, METASEARCH, SEARCH (this topic)
CONTENTMODE{web="WEB"} -- content mode
- Returns the content mode of the specified web. It's either 'local', 'read-only', 'master', or 'slave'. Read ReadOnlyAndMirrorWebs for more detail.
- Syntax:
%CONTENTMODE{web="WEB"}%
- Supported parameters:
Parameter: Description: Default: web
The name of the web. The current web - Category: SystemInformationVariables
- Related: SITENAME, ReadOnlyAndMirrorWebs, MetadataRepository (this topic)
DATE -- signature format date
- Syntax:
%DATE%
- Expands to:
2025-10-09
- Date format defined as {DefaultDateFormat} in configure, default
$year-$mo-$day
- Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Category: DateAndTimeVariables, SystemInformationVariables
- Related: DISPLAYTIME, GMTIME{"format"}, SERVERTIME (this topic)
DISPLAYTIME -- display date and time
- Syntax:
%DISPLAYTIME%
- Expands to:
2025-10-09 - 15:51
- Date part of the format is displayed as defined by the {DefaultDateFormat} in configure, default
$year-$mo-$day
. The time is shown as hh:mm (24 hour clock) - Category: DateAndTimeVariables, SystemInformationVariables
- Related: DISPLAYTIME{"format"}, GMTIME, SERVERTIME (this topic)
DISPLAYTIME{"format"} -- formatted display time
- Formatted time - either GMT or Local server time, depending on {DisplayTimeValues} setting in configure, default
$year-$mo-$day
. Same format qualifiers as%GMTIME%
- Syntax:
%DISPLAYTIME{"format"}%
- Supported variables:
$seconds
,$minutes
,$hours
,$day
,$wday
,$dow
,$month
,$mo
,$year
,$ye
,$tz
,$iso
,$rcs
,$http
,$epoch
- Example:
%DISPLAYTIME{"$hou:$min"}%
expands to15:51
- Category: DateAndTimeVariables, SystemInformationVariables
- Related: DISPLAYTIME, GMTIME, SERVERTIME (this topic)
ENV{"varname"} -- inspect the value of an environment variable
- Returns the current value of the environment variable in the CGI (Common Gateway Interface) environment. This is the environment that the TWiki scripts run in on the web server.
- Note: For security reasons, only those variables whose names match the regular expression in
{AccessibleENV}
in the Security Settings/Miscellaneous section ofconfigure
can be displayed. Any other variable will just be shown as an empty string, irrespective of its real value. - Example:
%ENV{MOD_PERL}%
displays as: not set - If a variable is undefined (as against being set to the empty string) it will be returned as
not set
. - Category: SystemInformationVariables
- Related: HTTP_HOST, REMOTE_ADDR, REMOTE_PORT, REMOTE_USER (this topic)
FAILEDPLUGINS -- debugging for plugins that failed to load, and handler list
- Syntax:
%FAILEDPLUGINS%
- Expands to: See TWikiPlugins
- Category: AdministrationVariables, SystemInformationVariables
- Related: PLUGINDESCRIPTIONS, ACTIVATEDPLUGINS, PLUGINVERSION, TWikiPlugins, InstalledPlugins (this topic)
HOMETOPIC -- home topic in each web
- Note: Each web has a home topic
- Syntax:
%HOMETOPIC%
- Expands to:
WebHome
, renders as WebHome - Category: SystemInformationVariables
- Related: NOTIFYTOPIC, SITESTATISTICSTOPIC,STATISTICSTOPIC, TOPIC (this topic)
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"}%
%HTTP{"User-Agent"}%
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) - Limitation: For security reasons, the
COOKIE
field value cannot be retrieved. You can add or delete hidden fields by changing the{HTTP}{HiddenFields}
configuration parameter. - 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
- Category: SystemInformationVariables
- Related: HTTPS, REMOTE_ADDR, REMOTE_PORT, REMOTE_USER (this topic)
HTTP_HOST -- environment variable
- Syntax:
%HTTP_HOST%
- Expands to:
junobase.com
- Category: SystemInformationVariables
- Related: ENV, REMOTE_ADDR, REMOTE_PORT, REMOTE_USER (this topic)
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"}%
- Limitation: For security reasons, the
COOKIE
field value cannot be retrieved. You can add or delete hidden fields by changing the{HTTP}{HiddenFields}
configuration parameter. - Category: SystemInformationVariables
- Related: HTTP, REMOTE_ADDR, REMOTE_PORT, REMOTE_USER (this topic)
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%
- Example: If topic A includes B, and B includes C, then a
%INCLUDINGTOPIC%
in topic C is reported as B when looking at topics A or B, and as C when looking at topic C itself. - Category: SystemInformationVariables
- Related: BASETOPIC, INCLUDINGWEB, INCLUDE, TOPIC (this 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%
- Syntax:
%INCLUDINGWEB{format="..."}%
-- see WEB for format documentation - Example: If topic A includes B, and B includes C, then a
%INCLUDINGWEB%
in topic C is reported as web of topic B when looking at topics A or B, and as of topic C when looking at topic C itself. - Category: SystemInformationVariables
- Related: BASEWEB, INCLUDINGTOPIC, INCLUDE, WEB (this topic)
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.
- If the
- Category: AdministrationVariables, SystemInformationVariables
- Related: LANGUAGES (this topic)
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 matchesselection
"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. - Category: AdministrationVariables, SystemInformationVariables
- 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 (this topic)
LOCALSITEPREFS -- web.topicname of site preferences topic
- The full name of the local site preferences topic. These local site preferences overload the system level preferences defined in TWikiPreferences.
- Syntax:
%LOCALSITEPREFS%
- Expands to:
Main.TWikiPreferences
, renders as TWikiPreferences - Category: AdministrationVariables, SystemInformationVariables
- Related: WEBPREFSTOPIC, WIKIPREFSTOPIC (this topic)
MAINWEB -- synonym for USERSWEB
- Deprecated. Please use %USERSWEB% instead.
- Category: SystemInformationVariables
- Related: SYSTEMWEB, USERSWEB (this topic)
MDREPO -- retrieve data from metadata repository
- Attention: This variable works only if MetadataRepository is in use. Otherwise, it always returns a zero length string.
- This retrieves data from the specified metadata repository table.
- Syntax:
%MDREPO{ "table" ...}%
(generic form),%MDREPO{ web="..." ...}%
(web specific form) - Parameters (generic form without
web="..."
parameter):Parameter Description Default "..."
Specify the table to retrieve This or below is required table="..."
(Alternative to above) This or above is required separator="..."
The separator string of records "$n"
(new line)format="..."
Format of one record. It may contain the following items. In addtion, the standard special tokens are handled accordingly. Item Description $_
or$_()
the record ID $__
or$__()
The record value in the following format:
FIELD_NAME=FIELD_VALUE FIELD_NAME=FIELD_VALUE ...$marker
or$marker()
Expands to marker
for the item matchingselection
only$_FILED_NAME
or$_FIELD_NAME()
Please be noted that you need to put _ (underscore) in front of a field name. $_FIELD_NAME$
yields the value of the specified field. If the specified field does not exist in the record, it returns the null string ("").?FIELD_NAME?IF_FIELD_HAS_VALUE?
If the specified field has value and it's neither 0 nor the null string (""), it's evaluated as IF_FIELD_HAS_VALUE. Otherwise, it's evaluated as the null string. This is like q/.../ in Perl. A non-word character following ?FIELD_NAME
becomes the terminator; i.e. you can write:?FIELD_NAME:IF_TRUE:
Specifically, the following characters can be used as the delimiter:! # % ' / : ? @ ^ ` | ~
=
is excluded because it clashes with a parameter specification in a URL (?name=value).?!FIELD_NAME?IF_FIELD_HAS_NO_VALUE?
Similar to above but it's opposite. If the field has value, it's evaluated as the null string. Otherwise, it's evaluated as IF_FIELD_HAS_NO_VALUE. $question
Replaced with ?
after the?FIEL_DNAME
and?!FIELD_ANME
constructs are processed."| $_ | $__ |"
selection="..."
The record ID to be regarded as the selected. It affects how $marker
in the format is evaluated.none marker="..."
Text for $marker
in the format if the item matchesselection
"selected"
filter="..."
The regular expression of record IDs to filter records. Matching is case-insensitive none exclude="..."
Comma separated list of record IDs to be excluded. You can use regular expression. If you specify Trash\d*, then Trash, Trash1, Trash2, ... are exluded but LightTrash and TrashBag are not excluded none - Example:
%MDREPO{"webs" filter="^A" format="| $_ | $_admin | $_master |"}%
This would show the metadata of webs whose names start with A. - Paramerers (web specific form):
Parameter Description Default web="..."
Specify the web. If it's a subweb, the corresponding top level web is specified This is required "..."
Specify the format of the return value in the same manner as the format
parameter in the generic form$__
default="..."
Specify the value to be returned when the specified or implied top level web does not exist in MDREPO ""
(null string) - Example:
%MDREPO{web="Foo/Bar" "$_admin"}%
This would show the admin field of the Foo web. - Category: AdministrationVariables, SystemInformationVariables
- Related: MetadataRepository (this topic)
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 FormattedSearch for$formfield
.
newline="..."
: by default, each newline character will be rewritten to<br />
to allow metadata that contains newlines to be used in tables, etc.$n
indicates a newline character.
bar="..."
: by default, each vertical bar is rewritten to an HTML entity so as to not be mistaken for a table separator.
encode="type"
: have the value encoded in the specified type. Possible types are the same as ENCODE's. If this is specified,newline
andbar
options are ignored.
topic="..."
: Get meta info of "Topic" or "Web.Topic"; default"%BASEWEB%.%BASETOPIC%"
.Show a single form field "form"
topic="..."
: Get meta info of "Topic" or "Web.Topic"; default"%BASEWEB%.%BASETOPIC%"
.Generates the table showing the form fields. See Form Templates "attachments"
all="on"
to show hidden attachments.
title="..."
to show a title - only if attachments are displayed.
template="..."
to use a custom template for the rendering of attachments; defaultattachtables
is used.
topic="..."
: Get meta info of "Topic" or "Web.Topic"; default"%BASEWEB%.%BASETOPIC%"
.Generates the list of attachments "moved"
topic="..."
: Get meta info of "Topic" or "Web.Topic"; default"%BASEWEB%.%BASETOPIC%"
.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 parent topic where$web
expands to the web name, and$topic
expands to the topic name; default:"[[$web.$topic][$topic]]"
suffix="..."
: Suffix, only appears if there are parents; default""
.
separator="..."
: Separator between parents; default" > "
.
topic="..."
: Get meta info of "Topic" or "Web.Topic"; default"%BASEWEB%.%BASETOPIC%"
.Generates the parent link - Attention: The base topic, not the current topic, is used if
%META{}%
is placed in an included topic. Add atopic="%WEB%.%TOPIC%"
parameter if you need meta info of the current topic. - Note: Formatting tokens can be used for
newline
,prefix
,format
,suffix
andseparator
options, such asseparator="$n * "
- Category: AttachmentsAndFilesVariables, SearchingAndListingVariables, SystemInformationVariables
- Related: EDITFORM, EDITFORMFIELD, FORM, FORMFIELD, METASEARCH, PARENTTOPIC, SEARCH, ENCODE, FormattedSearch (this topic)
METASEARCH -- special search of meta data
- Syntax:
%METASEARCH{...}%
- Supported parameters:
Parameter: Description: Default: type="..."
Type of search:
•"topicmoved"
- search for a topic that may have been moved.
•"parent"
- search for topics that have a specific parent i.e. its children.
•"field"
- search for topics that have a particular form field value (use thename
andvalue
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. Current topic name="..."
form field to search, for type="field"
searches. May be a regular expression (see SEARCH).value="..."
form field value, for type="field"
searches. May be a regular expression (see SEARCH).title="Title"
Text that is prefixed to any search results. ""
(empty)format="..."
Custom format of each search hit. Supports same format strings as SEARCH. See FormattedSearch for usage, variables & examples "$topic"
separator="..."
Separator between search hits. "$n"
(newline)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 WebTopicViewTemplate and WebTopicNonWikiTemplate:
%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%
- Example:
%METASEARCH{type="field" name="Country" value="China"}%
- Note: METASEARCH is deprecated in favor of the much more powerful query type search. See SEARCH and QuerySearch.
- Category: SearchingAndListingVariables, SystemInformationVariables
- Related: CHILDREN, EDITFORM, EDITFORMFIELD, FORM, FORMFIELD, META, PARENTTOPIC, SEARCH (this topic)
NOTIFYTOPIC -- name of the notify topic
- Note: Each web has a notify topic
- Syntax:
%NOTIFYTOPIC%
- Expands to:
WebNotify
, renders as WebNotify - Category: SystemInformationVariables
- Related: HOMETOPIC, SITESTATISTICSTOPIC,STATISTICSTOPIC, TOPIC (this topic)
PARENTTOPIC -- parent of current topic
- Syntax:
%PARENTTOPIC%
or%PARENTTOPIC{ format="..." topic="..." }%
- Expands to:
TWikiVariables
, renders as TWikiVariables - Parameters:
Item Description Default format="..."
Format string used to display parent topic, where $web
expands to the web name, and$topic
expands to the topic name. Additional formatting tokens can be used."$topic"
(topic name)topic="..."
Get parent of "Topic" or "Web.Topic" "%WEB%.%TOPIC%"
(current topic) - Category: SystemInformationVariables
- Related: CHILDREN, META, METASEARCH, PARENTBC, SEARCH, TOPIC (this topic)
PLUGINDESCRIPTIONS -- list of plugin descriptions
- Syntax:
%PLUGINDESCRIPTIONS%
- Expands to:
- SpreadSheetPlugin (2018-07-05, $Rev: 30478 (2018-07-16) $): Add spreadsheet calculation like
"$SUM( $ABOVE() )"
to TWiki tables or anywhere in topic text - ActionTrackerPlugin (2017-08-05, $Rev: 30633 (2019-01-23) $): Adds support for action tags in topics, and automatic notification of action statuses
- AutoViewTemplatePlugin (2011-05-14, $Rev: 21260 (2011-05-14) $): Automatically sets VIEW_TEMPLATE and EDIT_TEMPLATE
- BackupRestorePlugin (2018-07-10, $Rev: 30551 (2018-07-16) $): Administrator utility to backup, restore and upgrade a TWiki site
- BreadCrumbsPlugin (2010-08-01, $Rev: 19303 (2010-08-01) $): A flexible way to display breadcrumbs navigation
- ColorPickerPlugin (2018-07-05, $Rev: 30442 (2018-07-16) $): Color picker, packaged for use in TWiki forms and TWiki applications
- CommentPlugin (2018-07-05, $Rev: 30530 (2018-07-16) $): Quickly post comments to a page without an edit/preview/save cycle
- DBCachePlugin (2.1, $Rev: 19283 (2010-07-30) $): Lightweighted frontend to the DBCacheContrib to query cached TWiki content
- DatePickerPlugin (2018-07-05, $Rev: 30446 (2018-07-16) $): Pop-up calendar with date picker, for use in TWiki forms, HTML forms and TWiki plugins
- EditTablePlugin (2018-07-05, $Rev: 30448 (2018-07-16) $): Edit TWiki tables using edit fields, date pickers and drop down boxes
- FilterPlugin (2010-07-25, $Rev: 19240 (2010-07-25) $): Substitute and extract information from content by using regular expressions
- FormQueryPlugin (TWiki-4, $Rev: 15561 (12 Dec 2008) $): Provides query capabilities across a database defined using forms and embedded tables in TWiki topics.
- GluePlugin (2.1, $Rev: 18553 (2010-04-30) $): Enable markup to span multiple lines
- GuidPlugin (2016-03-02, $Rev: 29983 (2016-03-02) $): Generate GUID unique IDs
- HeadlinesPlugin (2018-07-13, $Rev: 30560 (2018-07-16) $): Show headline news in TWiki pages based on RSS and ATOM news feeds from external sites
- IfDefinedPlugin (v1.1, $Rev: 18548 (2010-04-29) $): Render content conditionally
- InterwikiPlugin (2018-07-05, $Rev: 30454 (2018-07-16) $): Write
ExternalSite:Page
to link to a page on an external site based on aliases defined in a rules topic - JQueryPlugin (2018-07-05, $Rev: 30456 (2018-07-16) $): jQuery JavaScript library for TWiki
- JQueryTwistyPlugin (2010-07-25, $Rev: 19236 (2010-07-25) $): Twisty section JavaScript library to open/close content dynamically
- NotificationPlugin (2017-08-05, $Rev: 30635 (2019-01-23) $): This plugin allows you to send fine grained notifications of topics you are interested in
- PreferencesPlugin (2018-07-05, $Rev: 30528 (2018-07-16) $): Allows editing of preferences using fields predefined in a form
- QRCodePlugin (2018-07-17, $Rev: 30621 (2018-07-17) $): Create QR Code (a matrix barcode) in TWiki pages, useful for mobile applications
- SendMailPlugin (2016-01-19, $Rev: 29910 (2016-01-20) $): Send e-mail from actions in TWiki topics, useful for workflow automation
- SetGetPlugin (2018-07-05, $Rev: 30472 (2018-07-16) $): Set and get variables and JSON objects in topics, optionally persistently across topic views
- SlideShowPlugin (2018-07-05, $Rev: 30474 (2018-07-16) $): Create web based presentations based on topics with headings.
- SmiliesPlugin (2018-07-05, $Rev: 30476 (2018-07-16) $): Render smilies as icons, like
:-)
asor
:eek:
as - TWikiSheetPlugin (2018-07-15, $Rev: 30604 (2018-07-16) $): Add TWiki Sheet spreadsheet functionality to TWiki tables
- TablePlugin (2018-07-05, $Rev: 30480 (2018-07-16) $): Control attributes of tables and sorting of table columns
- TagMePlugin (2018-07-05, $Rev: 30482 (2018-07-16) $): Tag wiki content collectively or authoritatively to find content by keywords
- TinyMCEPlugin (2018-07-10, $Rev: 30541 (2018-07-16) $): Integration of the Tiny MCE WYSIWYG Editor
- TopicCreatePlugin (2014-11-07, $Rev: 28434 (2014-11-07) $): Automatically create a set of topics and attachments at topic save time
- TreePlugin (2015-08-12, $Rev: 29430 (2015-08-12) $): Dynamically generate TWiki topic trees based on the parent-child relationship of topics
- TwistyPlugin (2018-07-06, $Rev: 30497 (2018-07-16) $): Twisty section JavaScript library to open/close content dynamically
- UserInfoPlugin (2010-07-25, $Rev: 19259 (2010-07-25) $): Render information about users on a TWiki site
- WatchlistPlugin (2018-07-10, $Rev: 30536 (2018-07-16) $): Watch topics of interest and get notified of changes by e-mail
- WysiwygPlugin (2018-07-06, $Rev: 30528 (2018-07-16) $): Translator framework for WYSIWYG editors
- SpreadSheetPlugin (2018-07-05, $Rev: 30478 (2018-07-16) $): Add spreadsheet calculation like
- Category: AdministrationVariables, SystemInformationVariables
- Related: ACTIVATEDPLUGINS, FAILEDPLUGINS, PLUGINVERSION, TWikiPlugins, InstalledPlugins (this topic)
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: 30454 (2018-07-16) $
- Syntax:
%PLUGINVERSION%
to get the version of the API - Expands to:
6.10
- Category: AdministrationVariables, SystemInformationVariables
- Related: WIKIVERSION, ACTIVATEDPLUGINS, FAILEDPLUGINS, PLUGINDESCRIPTIONS, TWikiPlugins, InstalledPlugins (this topic)
PUBURL -- the base URL of attachments
- Syntax:
%PUBURL%
- Expands to:
https://junobase.com/pub
- Example: You can refer to a file attached to another topic with
%PUBURL%/%WEB%/OtherTopic/image.gif
- Category: AttachmentsAndFilesVariables, SystemInformationVariables
- Related: ATTACHURL, ATTACHURLPATH, PUBURLPATH, SCRIPTURL, SCRIPTURLPATH, FileAttachments (this topic)
PUBURLPATH -- the base URL path of attachments
- Syntax:
%PUBURLPATH%
- Expands to:
/pub
- Category: AttachmentsAndFilesVariables, SystemInformationVariables
- Related: ATTACHURL, ATTACHURLPATH, PUBURL, SCRIPTURL, SCRIPTURLPATH, FileAttachments (this topic)
QUERYPARAMS -- show paramaters to the query
- Expands the parameters to the query that was used to display the page.
- Syntax:
%QUERYPARAMS{...}%
- Parameters:
-
format="..."
format string for each entry, default$name=$value
-
separator="..."
separator string, defaultseparator="$n"
(newline) -
encode="..."
the encoding to apply to parameter values; see ENCODE for a description of the available encodings. If this parameter is not given, no encoding is performed.
-
- The following escape sequences are expanded in the format string:
Sequence: Expands To: $name
Name of the parameter $value
String value of the parameter. Multi-valued parameters will have a "row" for each value. $n
or$n()
New line. Use $n()
if followed by alphanumeric character, e.g. writeFoo$n()Bar
instead ofFoo$nBar
$nop
or$nop()
Is a "no operation". This variable gets removed; useful for nested search $quot
or\"
Double quote ( "
)$aquot
Apostrophe quote ( '
)$percnt
Percent sign ( %
)$dollar
Dollar sign ( $
)$lt
Less than sign ( <
)$gt
Greater than sign ( >
)
- Example:
%QUERYPARAMS{format="<input type='hidden' name='$name' value='$value' encoding="html" />"}%
- Category: DevelopmentVariables, SystemInformationVariables
- See also QUERYSTRING, URLPARAM (this topic)
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
%QUERYPARAMS%
. - Syntax:
%QUERYSTRING%
- Expands to:
sortcol=2;table=4;up=0
- Category: DevelopmentVariables, SystemInformationVariables
- Related: QUERYPARAMS, URLPARAM (this topic)
REMOTE_ADDR -- environment variable
- Syntax:
%REMOTE_ADDR%
- Expands to:
216.73.216.43
- Category: DevelopmentVariables, SystemInformationVariables
- Related: ENV, HTTP_HOST, REMOTE_PORT, REMOTE_USER (this topic)
REMOTE_PORT -- environment variable
- Syntax:
%REMOTE_PORT%
- Expands to:
- Category: DevelopmentVariables, SystemInformationVariables
- Related: ENV, HTTP_HOST, REMOTE_ADDR, REMOTE_USER (this topic)
REMOTE_USER -- environment variable
- Syntax:
%REMOTE_USER%
- Expands to:
- Category: DevelopmentVariables, SystemInformationVariables, UsersAndAuthenticationVariables
- Related: ENV, HTTP_HOST, REMOTE_ADDR, REMOTE_PORT, USERNAME, WIKINAME, WIKIUSERNAME (this topic)
REVINFO -- revision information of current topic
- Syntax:
%REVINFO%
- Expands to:
r4 - 2012-11-15 - 07:09:07 - TWikiContributor
- Date format defined as {DefaultDateFormat} in configure, default
$year-$mo-$day
- Category: SystemInformationVariables
- Related: REVINFO{"format"} (this 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 "r$rev - $date - $time - $wikiusername"
web="..."
Name of web Current web topic="..."
Topic name Current topic rev="5"
Specific revison number. Old RCS format "1.5"
is also supported.Latest revision - Supported variables in format:
Variable: Unit: Example $web
Name of web Current web $topic
Topic name Current topic $rev
Revison number. Add prefix r
to get the usualr5
format5
$username
Login username of revision jsmith
$wikiname
WikiName of revision JohnSmith
$wikiusername
WikiName with Main web prefix Main.JohnSmith
$date
Revision date. Actual date format defined as {DefaultDateFormat} in configure, default $year-$mo-$day
2010-12-31
$time
Revision time 23:24:25
$iso
Revision date in ISO date format 2006-09-22T06:24:25Z
$min
,$sec
, etc.Same date format qualifiers as GMTIME{"format"} - Example:
%REVINFO{"$date - $wikiusername" rev="1.1"}%
returns revision info of first revision - Category: SystemInformationVariables
- Related: GMTIME{"format"}, REVINFO (this topic)
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
- Category: DevelopmentVariables, SystemInformationVariables
- Related: SCRIPTSUFFIX, SCRIPTURL, SCRIPTURLPATH (this topic)
SCRIPTSUFFIX -- script suffix
- Some TWiki installations require a file extension for CGI scripts, such as
.pl
or.cgi
- Syntax:
%SCRIPTSUFFIX%
- Expands to:
- Category: DevelopmentVariables, SystemInformationVariables
- Related: SCRIPTNAME, SCRIPTURL, SCRIPTURLPATH (this topic)
SCRIPTURL -- base URL of TWiki scripts
- Syntax:
%SCRIPTURL%
- Expands to:
https://junobase.com/do
- Note: The
edit
script should always be used in conjunction with?t=%GMTIME{"$epoch"}%
to ensure pages about to be edited are not cached in the browser - Category: DevelopmentVariables, SystemInformationVariables
- Related: PUBURL, SCRIPTNAME, SCRIPTSUFFIX, SCRIPTURL{"script"}, SCRIPTURLPATH, TWikiScripts (this topic)
SCRIPTURL{"script"} -- URL of TWiki script
- Expands to the URL of the specified script. Optionally, you can specify a web and/or a topic. In that case, the URL of the script for the specified web and topic is returned.
- If ReadOnlyAndMirrorWebs is in effect and a web is specified, whether the web is a slave or not is taken into account. For a slave web, with scripts
edit
,save
,attach
,upload
, andrename
, the URL on the master site is returned.
For the other scripts, if themaster="on"
parameter is specified, the URL on the master site is returned. - Syntax:
%SCRIPTURL{"script" ...}%
- Supported parameters:
Parameter: Description: Default: "script"
The name of the script web="WEB"
Specifies a web When a topic name is specified and a web is not, the current web is assumed topic="TOPIC"
ortopic="WEB.TOPIC"
Specifies a topic or both a web and a topic master="on"
A URL on the master site is needed or not off
- If
web="WEB"
is specified buttopic
is not specified, the resulting URL ends withWEB
. - Example: To get the authenticated version of the current topic you can write
%SCRIPTURL{"viewauth"}%/%WEB%/%TOPIC%
which expands tohttps://junobase.com/do/viewauth/TWiki/TWikiVariablesCategoryBody
. It can be written%SCRIPTURL{"viewauth" topic="%TOPIC%"}%
as well. - Example: Let's assume this site has a web named 'Flowers' whose master site is
http://florawiki/cgi-bin
. Then%SCRIPTURL{"edit" web="Flowers"}%
expands tohttp://florawiki/cgi-bin/edit/Flowers
. This is because the 'Flower' web on this site is a slave and editing needs to happen on the master site. - Example: Asuming above,
%SCRIPTURL{"view" web="Flowers" master="on"}%
expands tohttp://florawiki/cgi-bin/view/Flowers
. Theview
script works on a slave site, butmaster="on"
parameter forces to yield the master site URL. - Example: How to link to another topic with a URL parameter:
[[%SCRIPTURL{view}%/%WEB%/MyQuery?food=sushi][Sushi]]
- Note: In most cases you should use
%SCRIPTURLPATH{"script"}%
instead, as it works with URL rewriting much better - Category: DevelopmentVariables, SystemInformationVariables
- Related: CONTENTMODE, PUBURL, SCRIPTNAME, SCRIPTSUFFIX, SCRIPTURL, SCRIPTURLPATH, SCRIPTURLPATH{"script"}, SITENAME, ReadOnlyAndMirrorWebs, MetadataRepository, TWikiScripts (this topic)
SCRIPTURLPATH -- base URL path of TWiki scripts
- As
%SCRIPTURL%
, but doesn't include the protocol and host part of the URL - Syntax:
%SCRIPTURLPATH%
- Expands to:
/do
- Note: The
edit
script should always be used in conjunction with?t=%GMTIME{"$epoch"}%
to ensure pages about to be edited are not cached in the browser - Category: DevelopmentVariables, SystemInformationVariables
- Related: PUBURLPATH, SCRIPTNAME, SCRIPTSUFFIX, SCRIPTURL, SCRIPTURLPATH{"script"} (this topic)
SCRIPTURLPATH{"script"} -- URL path of TWiki script
- As
%SCRIPTURL{"script"}%
, but doesn't include the protocol and host part of the URL - Like
%SCRIPTURL{"script"}%
, this variable is aware of ReadOnlyAndMirrorWebs. So it may return a URL of a different site. - Syntax:
%SCRIPTURLPATH{"script" ...}%
- Supported parameters:
Parameter: Description: Default: "script"
The name of the script. web="WEB"
Specifies a web When a topic name is specified and a web is not, the current web is assumed topic="TOPIC"
ortopic="WEB.TOPIC"
Specifies a topic or both a web and a topic master="on"
A URL on the master site is needed or not. off
- If
web="WEB"
is specified buttopic
is not specified, the resulting URL ends withWEB
. - Example:
%SCRIPTURLPATH{"view"}%
expands to"/do/view"
(This might be a null string. Hence surrounded by double quotes) - Example:
%SCRIPTURLPATH{"view" web="%WEB%"}%
expands to/do/view/TWiki
- Example:
%SCRIPTURLPATH{"view" topic="%TOPIC%"}%
expands to/do/view/TWiki/VarSCRIPTURLPATH2
- Example: Let's assume this site has a web named 'Flowers' whose master site is
http://florawiki/cgi-bin
. Then%SCRIPTURLPATH{"edit" web="Flowers"}%
expands tohttp://florawiki/cgi-bin/edit/Flowers
. This is because the 'Flower' web on this site is a slave and editing needs to happen on the master site. - Category: DevelopmentVariables, SystemInformationVariables
- Related: CONTENTMODE, PUBURLPATH, SCRIPTNAME, SCRIPTSUFFIX, SCRIPTURL, SCRIPTURL{"script"}, SCRIPTURLPATH, ReadOnlyAndMirrorWebs, MetadataRepository, TWikiScripts (this topic)
SERVERTIME -- server time
- Syntax:
%SERVERTIME%
- Expands to:
2025-10-09 - 15:51
- Date format defined as {DefaultDateFormat} in configure, default
$year-$mo-$day
- Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Category: DateAndTimeVariables, SystemInformationVariables
- Related: DISPLAYTIME, GMTIME, SERVERTIME{"format"} (this topic)
SERVERTIME{"format"} -- formatted server time
- Same format qualifiers as
%GMTIME%
- Syntax:
%SERVERTIME{"format"}%
- Supported variables:
$seconds
,$minutes
,$hours
,$day
,$wday
,$dow
,$month
,$mo
,$year
,$ye
,$tz
,$iso
,$rcs
,$http
,$epoch
- Example:
%SERVERTIME{"$hou:$min"}%
expands to15:51
- Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Category: DateAndTimeVariables, SystemInformationVariables
- Related: DISPLAYTIME, GMTIME, SERVERTIME (this topic)
SESSIONID -- unique ID for this session
- Syntax:
%SESSIONID%
- Expand to: 57d1d61d65acfee7fefefbce82567460
- Category: DevelopmentVariables, SystemInformationVariables, UsersAndAuthenticationVariables
- Related: TWikiUserAuthentication, AUTHREALM, SESSIONVAR, LOGIN, LOGOUT, SESSION_VARIABLE (this topic)
SESSIONVAR -- name of CGI and session variable that stores the session ID
- Syntax:
%SESSIONVAR%
- Expand to: TWIKISID
- Category: DevelopmentVariables, SystemInformationVariables
- Related: TWikiUserAuthentication, AUTHREALM, SESSIONID, LOGIN, LOGOUT, SESSION_VARIABLE (this topic)
SESSION_VARIABLE -- get, set or clear a session variable
- Session variables are stored in a personal "persistent memory space" that is not lost until the web browser is closed
- Syntax:
%SESSION_VARIABLE{"name"}%
- read a session variable - Syntax:
%SESSION_VARIABLE{"name" set="value"}%
- set a session variable - Syntax:
%SESSION_VARIABLE{"name" clear=""}%
- clear a session variable - Special read-only session variables:
-
%SESSION_VARIABLE{"AUTHUSER"}%
- user ID, current value: -
%SESSION_VARIABLE{"SESSION_REQUEST_NUMBER"}%
- number of pages accessed by current user since login, current value:
-
- Note: It is not possible to set/get/clear session variables starting with an underscore, such as
"_NON_OF_YOUR_BUSINESS"
- Category: DevelopmentVariables, SystemInformationVariables, UsersAndAuthenticationVariables
- Related: TWikiUserAuthentication, AUTHREALM, GET, LOGIN, LOGOUT, SESSIONID, SESSIONVAR, SET (this topic)
SITENAME -- the current site name
- Syntax:
%SITENAME%
- Supported parameters: none
- Returns the current site name defined by
{ReadOnlyAndMirrorWebs}{SiteName}
if defined. Returns the null string if not. - Category: SystemInformationVariables
- Related: CONTENTMODE, ReadOnlyAndMirrorWebs (this topic)
SITESTATISTICSTOPIC -- name of site statistics topic
- Note: The site statistics topic is assumed to be in the Main web.
- Syntax:
%SITESTATISTICSTOPIC%
- Expands to:
SiteStatistics
- Example:
%USERSWEB%.%SITESTATISTICSTOPIC%
renders as SiteStatistics - Category: SystemInformationVariables
- Related: HOMETOPIC, NOTIFYTOPIC, STATISTICSTOPIC, TOPIC (this topic)
STATISTICSTOPIC -- name of statistics topic
- Note: Each web has a statistics topic
- Syntax:
%STATISTICSTOPIC%
- Expands to:
WebStatistics
, renders as WebStatistics - Category: SystemInformationVariables
- Related: HOMETOPIC, NOTIFYTOPIC, SITESTATISTICSTOPIC, TOPIC (this topic)
SYSTEMWEB -- name of TWiki documentation web
- The web containing all documentation and default preference settings
- Syntax:
%SYSTEMWEB%
- Expands to:
TWiki
- Category: SystemInformationVariables
- Related: USERSWEB (this topic)
TOPIC -- name of current topic
-
%TOPIC%
expands to the name of the topic. If you are looking at the text of an included topic, it is the name of the included topic. - Syntax:
%TOPIC%
- Expands to:
TWikiVariablesCategoryBody
, renders as TWikiVariablesCategoryBody - Category: SystemInformationVariables
- Related: BASETOPIC, INCLUDINGTOPIC, PARENTTOPIC, TOPICLIST, TOPICURL, WEB (this 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
$topic
variable gets expanded to the topic name,$marker
tomarker
parameter where topic matchesselection
, and$web
to the name of the web, or any of the standard FormatTokens. - Syntax:
%TOPICLIST{"format" ...}%
- Supported parameters:
Parameter: Description: Default: "format"
Format of one line, may include $web
(name of web),$topic
(name of the topic),$marker
(which expands tomarker
for the item matchingselection
only)"$topic"
format="format"
(Alternative to above) "$topic"
separator=", "
line separator "$n"
(new line)marker="selected"
Text for $marker
if the item matchesselection
"selected"
selection="TopicA, TopicB"
Topic(s) to show selected with $marker
; specify a comma-space list of full topic names(none)
web="Name"
Name of web Current web - Example:
%TOPICLIST{" * $web.$topic"}%
creates a bullet list of all topics - Example:
%TOPICLIST{separator=", "}%
creates a comma separated list of all topics - Example:
%TOPICLIST{" <option>$topic</option>"}%
creates an option list (for drop down menus) - Example:
<select>%TOPICLIST{" <option $marker value='$topic'>$topic</option>" separator=" " selection="%TOPIC%"}%</select>
creates an option list of web topics with the current topic selected - Category: SearchingAndListingVariables, SystemInformationVariables
- Related: SEARCH, WEBLIST (this topic)
TOPICTITLE -- title of a topic
- The topic title is defined by, in order of sequence:
- form field named "Title",
- topic preference setting named TITLE,
- topic name.
- Syntax:
%TOPICTITLE%
or%TOPICTITLE{ topic="TopicName" }%
- Supported parameters:
Parameter: Description: Default: "..."
or
topic="..."
Topic to get the title from. Can be of form TopicName
orWeb.TopicName
.Current topic encode="html"
Encode special characters into HTML entities. If a TOPICTITLE is passed into an HTML form field it should be encoded as "html"
. Additional encodings:encode="quote"
,encode="moderate"
,encode="safe"
,encode="entity"
andencode="url"
. See ENCODE for details.""
(no encoding) - Example:
%TOPICTITLE{Projects.SushiProject}%
returnsSushi Project
assuming the topic has a form field named "Title" with value "Sushi Project" - Expands to:
TWikiVariablesCategoryBody
- Hint: Write
[[+SomeTopicName]]
to get the topic title link of a topic, see TWikiEditingShorthand - Category: SystemInformationVariables
- Related: BASETOPIC, INCLUDINGTOPIC, PARENTTOPIC, TOPIC, TOPICLIST, TOPICURL, WEB (this topic)
TOPICURL -- shortcut to viewing the current topic
- This variable always expands to an url pointing to the current base topic.
- Type: Preference variable - TWikiRenderingShortcut.
- Syntax:
%TOPICURL%
- shortcut for%SCRIPTURL{view}%/%WEB%/%TOPIC%
- Expands to: https://junobase.com/do/view/TWiki/SystemInformationVariables
- Category: SystemInformationVariables
- Related: SCRIPTURL, TOPIC, WEB, TWikiPreferences rendering shortcuts (this topic)
TWIKIWEB -- synonym for SYSTEMWEB
- Deprecated. Please use
%SYSTEMWEB%
instead. - Category: SystemInformationVariables
- Related: SYSTEMWEB, USERSWEB (this topic)
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 newline="$br"
Convert newlines in textarea to other delimiters. Variables $br
(for<br />
tag),$n
(for newline) are expanded. Other text is encoded based onencode
parameter.no conversion encode="off"
Turn off encoding. See important security note below encode="safe"
encode="quote"
Escape double quotes with backslashes ( \"
), does not change other characters; required when feeding URL parameters into other TWiki variables. This encoding does not protect against cross-site scripting.encode="safe"
encode="moderate"
Encode special characters into HTML entities for moderate cross-site scripting protection: "<"
,">"
, single quote ('
) and double quote ("
) are encoded. Useful to allow TWiki variables in comment boxes.encode="safe"
encode="safe"
Encode special characters into HTML entities for cross-site scripting protection: "<"
,">"
,"%"
, single quote ('
) and double quote ("
) are encoded.(this is the default) encode="entity"
Encode special characters into HTML entities. See ENCODE for details. encode="safe"
encode="html"
Encode special characters into HTML entities. In addition to encode="entity"
, it also encodes space, newline (\n
) and linefeed (\r
). Useful to encode text properly in HTML input fields.encode="safe"
encode="url"
Encode special characters for URL parameter use, like a double quote into %22
encode="safe"
encode="search"
Special encoding used for SEARCH: Substitute % characters into non-printable characters, so that TWikiVariables are no longer expanded. Also escapes quotes. Used to feed a search string from a URLPARAM into SEARCH without expanding any variables, such as when searching for %BR%
.type="url"
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"
(newline)format="..."
Format the result. $value
expands to the URL parameter. If multiple is specified,$value
expands to the result of the concatenated items."$value"
default="..."
Default value in case parameter is empty or missing. The format parameter is not applied. empty string - Example:
%URLPARAM{"skin"}%
returnsprint
for a.../view/TWiki/TWikiVariablesCategoryBody?skin=print
URL -
Notes:
- IMPORTANT: There is a risk that this variable can be misused for cross-site scripting
(XSS) if the encoding is turned off. The
encode="safe"
is the default, it provides a safe middle ground. Theencode="entity"
is more aggressive, but some TWiki applications might not work. - URL parameters passed into HTML form fields should be encoded as
"html"
.
Example:<input type="text" name="address" value="%URLPARAM{ "address" encode="html" }%" />
- Double quotes in URL parameters must be escaped when passed into other TWiki variables.
Example:%SET{ "lunch" value="%ENCODE{ "string with "quotes"" type="quotes" }%" remember="1" }%
- Percent characters and double quotes in URL parameters should be escaped when passed into a SEARCH variable.
Example:%SEARCH{ "%URLPARAM{ "query" encode="search" }%" noheader="on" }%
- When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Watch out for TWiki internal parameters, such as
rev
,skin
,template
,topic
,web
; they have a special meaning in TWiki. Common parameters and view script specific parameters are documented at TWikiScripts. - If you have
%URLPARAM{
in the value of a URL parameter, it will be modified to%<nop>URLPARAM{
. This is to prevent an infinite loop during expansion.
- IMPORTANT: There is a risk that this variable can be misused for cross-site scripting
- Category: DevelopmentVariables, SystemInformationVariables
- Related: ENCODE, ENTITY, SEARCH, FormattedSearch, QUERYSTRING (this topic)
USERINFO{"name"} -- retrieve details about a user
- Syntax:
%USERINFO%
- Expands to:
guest, TWikiGuest,
(comma-separated list of the username, wikiusername, and emails) - With formatted output, using tokens
$emails
,$username
,$wikiname
,$wikiusername
,$groups
and$admin
($admin returns 'true' or 'false'):- Example:
%USERINFO{ format="$username is really $wikiname" }%
- Expands to:
guest is really TWikiGuest
- Example:
- Retrieve information about another user:
- Example:
%USERINFO{ "TWikiGuest" format="$username is really $wikiname" }%
- Expands to:
guest is really TWikiGuest
- Note: The parameter should be the wikiname of a user. Since TWiki 4.2.1, you can also pass a login name. 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)
- Example:
- Category: SystemInformationVariables, UsersAndAuthenticationVariables
- Related: USERNAME, WIKINAME, WIKIUSERNAME, TWikiUserAuthentication, ChangeEmailAddress (this topic)
USERNAME -- your login username
- TWiki makes names available in three formats: USERNAME like
jsmith
, WIKINAME likeJohnSmith
and WIKIUSERNAME likeMain.JohnSmith
. Un-authenticated users are all TWikiGuest. - Syntax:
%USERNAME%
- Expands to:
guest
- Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Category: SystemInformationVariables, UsersAndAuthenticationVariables
- Related: REMOTE_USER, USERINFO, WIKINAME, WIKIUSERNAME, TWikiUserAuthentication (this topic)
USERSWEB -- name of users web
- The web containing individual user topics, TWikiGroups, and customized site-wide preferences.
- Syntax:
%USERSWEB%
- Expands to:
Main
- Category: SystemInformationVariables
- Related: SYSTEMWEB (this topic)
VAR{"NAME" ...} -- get a preference value from another web or topic and more
- Gets the value of a variable in various manners.
- If the
topic
parameter is specified, it gets the value of the specified preferences variable in the specified topic. Please note that the WebPreferences of the web of the specified topic is not examined. So the returned value may not be the same as the value of the variable when the specified topic is viewed. - If the
topic
parameter is not specified and theweb
parameter is specified, it gets the value of the specified preferences variable in the specified web, which means the specified web's WebPreferences is examined for the variable. - If the neither the
topic
norweb
parameter is specified, it gets the value of the specified variable in the current context -- the variable can either be a preferences variable or a session variable but cannot be a tag with a tag handler (e.g.%GMTIME%
).
%VAR{"NAME"}%
is similar to%NAME%
, but they differ ifNAME
is undefined, in which case%VAR{"NAME"}%
is expanded to null (zero width string) while%NAME%
remains as is (%NAME%
).%VAR{"NAME"}%
yields the same value as%IF{"defined NAME" then="$percntNAME$percnt"}%
if NAME is a variable, but the latter is cubmersome.
- If the
- Syntax:
%VAR{"NAME" ...}%
- Supported parameters:
Parameter: Description: Default: "Variable"
The name of the variable to be retrieved. If not specified, %VAR{...}%
is expanded to null.required topic="Web.Topic"
Specifies the topic in which the specified preferences vaiable is fetched. none topic="Topic"
Same as above, but the web is specified specified explicitly with the web
parameter or the current web is specified.none web="Web"
Specifies the web in which the specified preferences variable is fetched. none default="Value"
Specifies the value to be returned if the specified variable is undefined. ""
(null string)ignorenull="on"
If specified, a null string ("") value is regarded as undefined. This affects whether or not the value specified by the default
parameter is returned."off"
- Example 1: To get the members of TWikiAdminGroup,
%VAR{"GROUP" topic="%USERSWEB%.TWikiAdminGroup"}%
, which expands toEmielVanRiel
. - Example 2: To get
%WEBBGCOLOR%
of the Main web write%VAR{"WEBBGCOLOR" web="Main"}%
, which expands to#FFEFA6
- Example 3: Let's say you are writing the "foo" skin. And you want to have the users specify a string inserted in the head tag with FOOSKIN_HTML_HEAD_HOOK. That can be achived by the following:
%VAR{"FOOSKIN_HTML_HEAD_HOOK" default="<nop>" ignorenull="on"}%
- Category: DevelopmentVariables, SystemInformationVariables
- Related: ALLVARIABLES, WEBPREFSTOPIC (this topic)
WEB -- name of current web
-
%WEB%
expands to the name of the web where the topic is located. If you are looking at the text of an included topic, it is the web where the included topic is located. - Syntax:
%WEB%
, expands to:TWiki
- Syntax:
%WEB{"..."}%
or%WEB{format="..."}%
- Supported parameter:
Parameter: Description: Example: Default: "..."
or
format="..."
Format of web name. Supported tokens:
•$web
- the full web path,
•$parents
- parent webs, if any,
•$current
- current web without parent webs,
•$last(n)
- last n webs, including current one,
•$top
- top-level web only,
•$top(n)
- n top-level webs,
•$item(n)
- the n-th web from top
•$list
- comma-space delimited list of webs
•$size
- array size of webs
Engineering/TechPubs/Apps/Bugs
Engineering/TechPubs/Apps
Bugs
for$current
Apps/Bugs
for$last(2)
Engineering
for$top
Engineering/TechPubs
for$top(2)
TechPubs
for$item(2)
Engineering, TechPubs, Apps, Bugs
4
for$size
"$web"
- Example, assuming
%WEB%
isEngineering/TechPubs/Apps/Bugs
:
%WEB{"Parent webs: $parents, current web: $current, top-level web: $top"}%
returns:
Parent webs: Engineering/TechPubs/Apps, current web: Bugs, top-level web: Engineering
- Category: SystemInformationVariables
- Related: BASEWEB, INCLUDINGWEB, TOPIC (this topic)
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
tomarker
where web matchesselection
. - Syntax:
%WEBLIST{"format" ...}%
- Supported parameters:
Parameter: Description: Default: "format"
Format of one line, may include following items. In addtion, the standard special tokens are handled accordingly. Item Description $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 $listindent
expands to multiple-of-3 spaces for bullet (*) and numberd (1., a., etc.) lists. It's relative to the depth of the web specified by the subwebs
parameter. See an example below.$marker
expands to marker
for the item matchingselection
only$web
expands to the value specified by the web
parameter$nop()
, one of FormatTokens. e.g.$name$nop()a
"$name"
format="format"
(Alternative to above) "$name"
separator=", "
Line separator "$n"
(new line)web=""
if you specify $web
in format, it will be replaced with this""
webs="public"
Comma separated list of webs. There are special webs: Item Description public
expands to all non-hidden webs. cancopyto
similar to public
, but webs to which a topic of the current web cannot be copied to are excluded. Specifically, excluded are read-only webs and mirror webs.canmoveto
similar to cancopyto
, but webs to which a topic of the current web cannot be moved to are excluded. Specifically, excluded are webs residing on different disks from the current web.webtemplate
expands to all template webs, whose name start with underscore (_)
NOTE 2: If MetadataRepository is used and webs are required to be registered, thencancopyto
,canmoveto
, andwebtemplate
behave differently.-
cancopyto
andcanmoveto
results include all top level webs and subwebs of the current webs are listed regardless of accessibility - subwebs of non-current webs are excluded. They also include the user's subweb. -
webtemplate
result has top level template webs only.
"public"
exclude="Legacy*, Sandbox"
Comma separated list of webs to exclude. Wildcards can be used, such as Legacy*
to exclude all webs starting with Legacy.""
marker="selected"
Text for $marker
if the item matchesselection
"selected"
selection="%WEB%"
Current value to be selected in list selection="%WEB%"
subwebs="Sandbox"
Show webs that are a sub-web of this one (recursivly) ""
depth="1"
Specify the maximum depth of recursive search. E.g. %WEBLIST{depth="1"}%
shows only top level webs.%WEBLIST{subwebs="Foo" depth="1"}%
shows the direct subwebs of Foo.(no maximum depth) limit="30"
Limit number of webs to show ""
(all)overlimit="..."
Message shown if over limit, such as: overlimit=" * [[%SYSTEMWEB%.SiteMap][More...]]"
""
reverse="on"
Reverse the order of the result. ""
(off) -
- Example:
%WEBLIST{"$listindent * [[$name.WebHome]]"}%
- creates a indented bullet list of all webs. - Example:
<form><select name="web"> %WEBLIST{"<option $marker value=$qname>$name</option>" webs="Trash, public" selection="%WEB%" separator=" "}% </select></form>
- creates a dropdown of all public webs + Trash web, with the current web highlighted. - Category: SearchingAndListingVariables, SystemInformationVariables
- Related: TOPICLIST, SEARCH, MetadataRepository, ReadOnlyAndMirrorWebs, UsingMultipleDisks (this topic)
WEBPREFSTOPIC -- name of web preferences topic
- Syntax:
%WEBPREFSTOPIC%
- Expands to:
WebPreferences
, renders as WebPreferences - Category: AdministrationVariables, SystemInformationVariables
- Related: HOMETOPIC, LOCALSITEPREFS, WIKIPREFSTOPIC, VAR (this topic)
WIKIHOMEURL -- site home URL
- DEPRECATED, please use %WIKILOGOURL% instead.
- Syntax:
%WIKIHOMEURL%
- Expands to:
/do/view/Main/WebHome
- Defined in: TWikiPreferences, default
%SCRIPTURLPATH{"view"}%/%USERSWEB%/%HOMETOPIC%
- Note: For the top bar logo URL use
%WIKILOGOURL%
defined in WebPreferences instead. - Category: AdministrationVariables, SystemInformationVariables
- Related: WIKILOGOURL, WIKITOOLNAME (this topic)
WIKILOGOALT -- site logo tooltip message
- Syntax:
%WIKILOGOALT%
- Expands to:
Home - this site is powered by TWiki(R)
- Defined in: TWikiPreferences
- Category: AdministrationVariables, SystemInformationVariables
- Related: WIKILOGOIMG, WIKILOGOURL, WIKITOOLNAME (this topic)
WIKILOGOIMG -- site logo image URL
- Syntax:
%WIKILOGOIMG%
- Expands to:
/pub/Main/JUNOLinkLogos/Juno_logo_2_witte_achtergrond_108_x_55.png
- Renders as: /pub/Main/JUNOLinkLogos/Juno_logo_2_witte_achtergrond_108_x_55.png
- Defined in: TWikiPreferences
- Category: AdministrationVariables, SystemInformationVariables
- Related: WIKILOGOALT, WIKILOGOURL, WIKITOOLNAME (this topic)
WIKILOGOURL -- site logo home URL
- Syntax:
%WIKILOGOURL%
- Expands to:
https://junobase.com/do/view/Main/WebHome
- Defined in: TWikiPreferences, default
%SCRIPTURLPATH{"view"}%/%USERSWEB%/%HOMETOPIC%
- Category: AdministrationVariables, SystemInformationVariables
- Related: WIKILOGOALT, WIKILOGOIMG, WIKITOOLNAME (this topic)
WIKINAME -- your Wiki username
- The WikiName is the same as
%USERNAME%
if not defined in the TWikiUsers topic - Syntax:
%WIKINAME%
- Expands to:
TWikiGuest
- Note: When used in a template topic, this variable will be expanded when the template is used to create new topic. See TWikiTemplates for details.
- Category: SystemInformationVariables, UsersAndAuthenticationVariables
- Related: REMOTE_USER, USERINFO, USERNAME, WIKIUSERNAME, WIKIUSERSTOPIC (this topic)
WIKIPREFSTOPIC -- name of site-wide preferences topic
- Syntax:
%WIKIPREFSTOPIC%
- Expands to:
TWikiPreferences
, renders as TWikiPreferences - Category: AdministrationVariables, SystemInformationVariables
- Related: HOMETOPIC, LOCALSITEPREFS, WEBPREFSTOPIC (this topic)
WIKITOOLNAME -- name of your TWiki site
- Syntax:
%WIKITOOLNAME%
- Expands to:
TWiki
- Category: SystemInformationVariables
- Related: WIKILOGOURL, WIKIVERSION (this topic)
WIKIUSERNAME -- your Wiki username with web prefix
- Your %WIKINAME% with Main web prefix, useful to point to your user profile page
- Syntax:
%WIKIUSERNAME%
- Expands to:
Main.TWikiGuest
, renders as TWikiGuest - Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details
- Category: SystemInformationVariables, UsersAndAuthenticationVariables
- Related: REMOTE_USER, USERINFO, USERNAME, WIKINAME (this topic)
WIKIUSERSTOPIC -- name of topic listing all registers users
- Syntax:
%WIKIUSERSTOPIC%
- Expands to:
TWikiUsers
, with Main prefix renders as TWikiUsers - Category: SystemInformationVariables, UsersAndAuthenticationVariables
- Related: WIKIUSERNAME (this topic)
WIKIVERSION -- the version of the installed TWiki engine
- Syntax:
%WIKIVERSION%
- Expands to:
TWiki-6.1.0, Mon, 16 Jul 2018, build 30610
- Category: AdministrationVariables, SystemInformationVariables
- Related: PLUGINVERSION, WIKITOOLNAME (this topic)
WIKIWEBMASTER -- email address of the administrator
-
%WIKIWEBMASTER%
expands to the email address of the administrator of this TWiki installation. - Syntax:
%WIKIWEBMASTER%
, expands to:admin@junobase.com
- Category: SystemInformationVariables
- Related: WIKIWEBMASTERNAME (this topic)
WIKIWEBMASTERNAME -- name of the administrator
-
%WIKIWEBMASTERNAME%
expands to the name of the administrator of this TWiki installation. - Syntax:
%WIKIWEBMASTERNAME%
, expands to:JUNOlink Administrator
- Category: SystemInformationVariables
- Related: WIKIWEBMASTEMER (this topic)
Categories:
Administration, Applications & Components, Attachments & Files, Charting & Drawing, Database & Forms, Date & Time, Development, Editing & Content Update, Email & Notification, Export & Publishing, Formatting & Rendering, Import, Linking & Navigation, Searching & Listing, Security & Access Control, Skins & Templates, System Information, Tables & Spreadsheets, UI& Visualization, Users & Authentication, Workflow & Automation