|
You are here: TWiki > |
r2 - 27 Oct 2005 - 01:05 - TWikiContributor |
%ACTIVATEDPLUGINS%%ATTACHURL%http://www.dementia.org/twiki/pub/TWiki/TWikiVariablesAtoM%ATTACHURL%/image.gif%ATTACHURLPATH%/twiki/pub/TWiki/TWikiVariablesAtoMconfigure. 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%21 Nov 2008%DISPLAYTIME%21 Nov 2008 - 17:24%GMTIME%%DISPLAYTIME{"format"}%%DISPLAYTIME{"$hou:$min"}% expands to 17:24%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%ENDSECTION{"name"}%| Parameter: | Description: | Default: |
|---|---|---|
"name" | Name of the section. Must be unique inside a topic, and must match with a previous %SEcTION% tag. | Mandatory parameter without a default |
%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%21 Nov 2008 - 17:24%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-11-21T17:24Z |
$rcs | RCS format timestamp | 2008/11/21 17:24:33 |
$http | E-mail & http format timestamp | Fri, 21 Nov 2008 17:24:33 GMT |
$epoch | Number of seconds since 00:00 on 1st January, 1970 | 1227288273 |
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% expands to 21 Nov, 2008 - 17:24:33%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) |
%HTTPS%%HTTPS{'Header-name'}%%HTTP_HOST%www.dementia.org%ICON{"name"}% or %ICON{"type"}%arrowbright, bubble, choice-yes, handbmp, doc, gif, hlp, html, mp3, pdf, ppt, txt, xls, xml, zip%ICON{"info"}% expands to %ICONPATH{"name"}% or %ICONPATH{"type"}%%ICONPATH{"info"}% expands to http://www.dementia.org/twiki/pub/TWiki/TWikiDocGraphics/info.gif which renders as 
%IF{"CONDITION" then="THEN" else="ELSE"}%CONDITION evaluates to TRUE, then THEN will be shown; otherwise ELSE will be shown.%IF{}% statements%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/"}% | |
pattern="..." | A RegularExpression pattern to include a subset of a topic or page | none |
rev="1.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) | on preferences setting |
section="name" | Includes only the specified section, as defined in the included topic by the SECTION and ENDSECTION tags |
%INCLUDE{"AnotherTopic" PONE="val 1" PTWO="val 2"}% will result in %PONE% and %PTWO% being defined within the included topic.%INCLUDE{"http://some.page.com/index.html" pattern="^.*?BEFORE(.*)AFTER.*" }%, where BEFORE is the part of the page just before the inclusion, and AFTER is the part just after the inclusion. %TOPIC% in case there is no include%INCLUDINGTOPIC%%WEB% if there is no INCLUDE.%INCLUDINGWEB%%LANGUAGES{...}%| Parameter: | Description: | Default: |
|---|---|---|
format | format for each item. See below for variables available in the format string. | " * $langname" |
sep | separator between items. | "\n" (newline) |
format variables: | Variable | Meaning |
|---|---|
$langname | language's name, as informed by the translators |
$langtag | language's tag. Ex: en, pt-br, etc. |
%LOCALSITEPREFS%%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="TWiki.ResetPassword,%WIKIUSERNAME%"}% string to the current user's language only if it has such string in its translation table for that language.%MAINWEB%Mainformfield 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"}%
Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.