%ACTIVATEDPLUGINS%
%ALLVARIABLES%
%ATTACHURL%
http://wiki.eurovotech.org/twiki/pub/TWiki/TWikiVariablesAtoM
%ATTACHURL%/image.gif
%ATTACHURLPATH%
/twiki/pub/TWiki/TWikiVariablesAtoM
configure. This is used in certain password encodings, and in login templates as part of the login prompt.
%AUTHREALM%
%TOPIC% if there is no INCLUDE
%BASETOPIC%
%WEB% in case there is no include.
%BASEWEB%
%DATE%
05 Dec 2008
%DISPLAYTIME%
05 Dec 2008 - 15:02
%GMTIME%
%DISPLAYTIME{"format"}%
%DISPLAYTIME{"$hou:$min"}% expands to 15:02
"\n") and linefeed ("\r")
"<", ">", "&", single quote (') and double quote (")
"%", "[", "]", "@", "_", "*", "=" and "|"
%ENCODE{"string"}%
| Parameter: | Description: | Default: |
|---|---|---|
"string" | String to encode | required (can be empty) |
type="entity" | Encode special characters into HTML entities, like a double quote into " | URL encoding |
type="url" | Encode special characters for URL parameter use, like a double quote into %22 | (this is the default) |
%ENCODE{"spaced name"}% expands to spaced%20name
<input type="text" name="address" value="%ENCODE{ "any text" type="entity" }%" />
%ENDSECTION{"name"}%
%ENDSECTION{type="include"}%
| Parameter: | Description: |
|---|---|
"name" | Name of the section. |
type="..." | Type of the section being terminated; supported types "section", "include", "templateonly". |
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.
%FAILEDPLUGINS%
%FORMFIELD{"fieldname"}%
| 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 | "" |
%FORMFIELD{"ProjectName" topic="Projects.SushiProject" default="(not set)" alttext="ProjectName field found"}%
%GMTIME%
05 Dec 2008 - 15:02
%GMTIME{"format"}%
| 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-12-05T15:02:18Z |
$rcs | RCS format timestamp | 2008/12/05 15:02:18 |
$http | E-mail & http format timestamp | Fri, 05 Dec 2008 15:02:18 GMT |
$epoch | Number of seconds since 00:00 on 1st January, 1970 | 1228489338 |
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% expands to 05 Dec, 2008 - 15:02:18
%HOMETOPIC%
WebHome, renders as WebHome
%HTTP%
%HTTP{"Header-name"}%
%HTTP% | |
%HTTP{"Accept-language"}% | en-us,en;q=0.5 |
%HTTP{"User-Agent"}% | CCBot/1.0 (+http://www.commoncrawl.org/bot.html) |
%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.
%HTTPS%
%HTTPS{"Header-name"}%
%HTTP_HOST%
wiki.eurovotech.org
%ICON{"name"}%
%ICON{"flag-gray"}% returns %ICON{"pdf"}% returns %ICON{"smile.pdf"}% returns %ICON{"/dont/you/dare/smile.pdf"}% returns %ICON{"http://twiki.org/doc/xhtml.xsl"}% returns arrowbright, bubble, choice-yes, hand
bmp, doc, gif, hlp, html, mp3, pdf, ppt, txt, xls, xml, zip
%ICON{"name"}% generates the full HTML img tag. Specify image name or full filename (see ICON for details on filenames.)
%ICONURL{"name"}%
%ICONURL{"arrowbright"}% returns http://wiki.eurovotech.org/twiki/pub/TWiki/TWikiDocGraphics/arrowbright.gif
%ICONURL{"novel.pdf"}% returns http://wiki.eurovotech.org/twiki/pub/TWiki/TWikiDocGraphics/pdf.gif
%ICONURL{"/queen/boheme.mp3"}% returns http://wiki.eurovotech.org/twiki/pub/TWiki/TWikiDocGraphics/mp3.gif
%ICONURLPATH{"name"}%
%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
%IF{"CONDITION" then="THEN" else="ELSE"}% shows "THEN" if "CONDITION" evaluates to TRUE, otherwise "ELSE" will be shown
%IF{"defined FUNFACTOR" then="FUNFACTOR is defined" else=" is not defined"}% renders as ==
%INCLUDE{"page" ...}%
| 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. | |
pattern="..." | A RegularExpression pattern to include a subset of a topic or page | none |
rev="2" | Include a previous topic revision; N/A for URLs | top revision |
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" | 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. |
%TOPIC% in case there is no include
%INCLUDINGTOPIC%
%WEB% if there is no INCLUDE.
%INCLUDINGWEB%
LANGUAGE preference is set, it's used as user's language instead of any language detected from the browser.
LANGUAGE at a non per-user way, so each user can choose his/her preferred language.
PO files) to TWiki. Those are the languages in which TWiki's user interface is available.
%LANGUAGES{...}%
| 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. |
<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
%LOCALSITEPREFS%
Main.TWikiPreferences, renders as TWikiPreferences
%LOGIN%
%LOGOUT%
%MAKETEXT{"string" args="..."}
| Parameter | Description | Default |
|---|---|---|
"text" or string="text" | The text to be displayed. | none |
args="param1, param2" | a comma-separated list of arguments to be interpolated in the string, replacing the [_N] placeholders in it. | none |
%MAKETEXT{string="Notes:"}% %MAKETEXT{"Contact [_1] if you have any questions." args="%WIKIWEBMASTER%"}% %MAKETEXT{"Did you want to [[[_1]][reset [_2]'s password]]?" args="%TWIKIWEB%.ResetPassword,%WIKIUSERNAME%"}% string to the current user's language only if it has such string in its translation table for that language.
&) followed by one letter (one of a...z, A...Z) (say, X) in the translatable string will be translated to <span class='twikiAccessKey'>X</span>. This is used to implement access keys. If you want to write an actual amperstand that stays just before a letter, write two consecutive amperstands (&&): they will be transformed in just one.
_) are reserved. You cannot use translatable phrases starting with an underscore.
%VARIABLES% inside the translatable strings (since they will get expanded before the %MAKETEXT{...}% itself is handled).
%MAINWEB%
Main
formfield item is the most likely to be useful to casual users.
%META{ "item" ...}%
| Item | Options | Description |
|---|---|---|
"formfield" | name="..." - name of the field. The field value can be shortened as described in FormattedSearch for $formfield | Show a single form field |
"form" | none | Generates the table showing the form fields. See Form Templates |
"attachments" | all="on" to show hidden attachments | Generates the table showing the attachments |
"moved" | none | Details of any topic moves |
"parent" | dontrecurse="on": By default recurses up tree, this has some cost. nowebhome="on": Suppress WebHome. prefix="...": Prefix that goes before parents, but only if there are parents, default "". suffix="...": Suffix, only appears if there are parents, default "". separator="...": Separator between parents, default is " > ". | Generates the parent link |
%METASEARCH{...}%
| Parameter: | Description: | Default: |
|---|---|---|
type="topicmoved" | What sort of search is required? "topicmoved" if search for a topic that may have been moved "parent" if searching for topics that have a specific parent i.e. its children "field" if searching for topics that have a particular form field value (use the name and value parameters to specify which field to search) | required |
web="%WEB%" | Wiki web to search: A web, a list of webs separated by whitespace, or all webs. | current web |
topic="%TOPIC%" | The topic the search relates to, for topicmoved and parent searches | current topic |
name | form field to search, for field type searches. May be a regular expression (see SEARCH). | |
value | form field value, for field type searches. May be a regular expression (see SEARCH). | |
title="Title" | Text that is prefixed to any search results | empty |
default="none" | Default text shown if no search hit | empty |
%METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}%
%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%
%METASEARCH{type="field" name="Country" value="China"}%