key Log In or Register to edit

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:

  1. Preferences variables: Can be defined and changed by the user
  2. 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 TIP (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:
  1. local site level in T Wiki Preferences
  2. user level in individual user topics in Main web
  3. web level in Web Preferences of each web
  4. topic level in topics in webs
  5. plugin topics (see T Wiki Plugins)
  6. 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:
  • Set VARIABLENAME = value
    • Set VARIABLENAME = value
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. T Wiki 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 T Wiki 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 Help icon
  • %I% - IDEA! Idea icon
  • %M% - MOVED TO... Moved to icon
  • %N% - NEW New icon
  • %P% - REFACTOR Refactor icon
  • %Q% - QUESTION? Question icon
  • %S% - PICK Pick icon
  • %T% - TIP Tip icon
  • %U% - UPDATED Updated icon
  • %X% - ALERT! Alert icon
  • %Y% - DONE Done icon

There are additional useful preferences variables defined in T Wiki Preferences, in Main.TWikiPreferences, 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.

  • ALERT! Predefined variables can be overridden by preferences variables
  • ALERT! Plugins may extend the set of predefined variables (see individual Plugins topics for details)
  • TIP Take the time to thoroughly read through ALL preference variables. If you actively configure your site, review variables periodically. They cover a wide range of functions, and it can be easy to miss the one perfect variable for something you have in mind. For example, see %INCLUDINGTOPIC%, %INCLUDE%, and the mighty %SEARCH%.

This version of TWiki - Sun, 02 Jul 2006 build 10776 - predefines the following variables:

ACTIVATEDPLUGINS -- list of currently activated plugins

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 T Wiki Variables in the current context

AQUA -- preference value for colored text

AQUA is one of the rendering shortcut settings predefined in T Wiki 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.

  • HELP 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.TWikiPreferences. Can be customized for a TWiki site in Main.TWikiPreferences, and for each web in their Web Preferences topics.
  • Current value: ATTACHEDIMAGEFORMAT = \n * $comment:
    $name

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

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 - T Wiki 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 T Wiki 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 T Wiki 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 T Wiki 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 01:44
  • 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 - T Wiki User Setting. Can be customized for a site in Main.TWikiPreferences, 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 - T Wiki User Setting. Can be customized for a site in Main.TWikiPreferences, 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 &#034; 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
  • ALERT! 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:

  1. An distribution default may be defined in TWiki.TWikiPreferences.
  2. A site customisation in Main.TWikiPreferences may override that value.
  3. Per-web customisation in individual WebPreferences topics can override that.
  4. 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.TWikiPreferences containing the following setting:

   * Set FINALPREFERENCES = WIKIWEBMASTER
In this case none of the WebPreferences 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 - T Wiki User Setting. Can be customized for a site in Main.TWikiPreferences, 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 2008-10-12T01:44:48Z
    $rcs RCS format timestamp 2008/10/12 01:44:48
    $http E-mail & http format timestamp Sun, 12 Oct 2008 01:44:48 GMT
    $epoch Number of seconds since 00:00 on 1st January, 1970 1223775888
  • Variables can be shortened to 3 characters
  • Example: %GMTIME{"$day $month, $year - $hour:$min:$sec"}% expands to 12 Oct, 2008 - 01:44:48
  • ALERT! Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See T Wiki 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 T Wiki 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 T Wiki 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;q=0.5
    %HTTP{"User-Agent"}% CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
  • ALERT! 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 T Wiki 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 flag-gray
    • %ICON{"pdf"}% returns pdf
    • %ICON{"smile.pdf"}% returns pdf
    • %ICON{"/dont/you/dare/smile.pdf"}% returns pdf
    • %ICON{"http://twiki.org/doc/xhtml.xsl"}% returns xsl
  • Graphic samples: arrowbright arrowbright, bubble bubble, choice-yes choice-yes, hand hand
  • File type samples: bmp bmp, doc doc, gif gif, hlp hlp, html html, wav mp3, pdf pdf, ppt ppt, txt txt, xls xls, xml xml, zip zip
  • Related: ICONURL, ICONURLPATH, T Wiki Preferences, File Attachments, T Wiki Doc Graphics

ICONURL{"name"} -- URL of small documentation graphic or icon

  • Generates the full URL of a T Wiki 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/twiki/pub/TWiki/TWikiDocGraphics/arrowbright.gif
    • %ICONURL{"novel.pdf"}% returns http://www.redbourn.org.uk/twiki/pub/TWiki/TWikiDocGraphics/pdf.gif
    • %ICONURL{"/queen/boheme.mp3"}% returns http://www.redbourn.org.uk/twiki/pub/TWiki/TWikiDocGraphics/mp3.gif
  • Related: ICONURLPATH, ICON, T Wiki Preferences, File Attachments, T Wiki Doc Graphics

ICONURLPATH{"name"} -- URL path of small documentation graphic or icon

  • Generates the URL path of a T Wiki 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 /twiki/pub/TWiki/TWikiDocGraphics/locktopic.gif
    • %ICONURLPATH{"eggysmell.xml"}% returns /twiki/pub/TWiki/TWikiDocGraphics/xml.gif
    • %ICONURLPATH{"/doc/xhtml.xsl"}% returns /twiki/pub/TWiki/TWikiDocGraphics/xsl.gif
  • Related: ICONURL, ICON, T Wiki Preferences, File Attachments, T Wiki 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.
    IDEA! 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 UR Ls top revision
    raw="on" When a page is included, normally TWiki 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 &lt; entities unless bypassed disabled
    disablerewriteurls="on" Bypass rewriting relative UR Ls 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 T Wiki 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.TWikiPreferences, renders as T Wiki 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 I18N infrastructure

  • Syntax: %MAKETEXT{"string" args="..."}
  • Supported parameters: