Log In
or
Register
TWiki Web
Users
Groups
Index
Search
Changes
Notifications
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
Main
Sandbox
TWiki
You are here:
FS
>
TWiki Web
>
TWikiVariables
>
TWikiVariablesAtoM
r2 - 27 Oct 2005 - 01:05 -
TWikiContributor
E
dit
A
ttach
P
rintable
Start of topic |
Skip to actions
__Note:__ This topic is included by TWikiVariables <!-- Please use bullet format --> ----- %STARTINCLUDE% #VarACTIVATEDPLUGINS ---+++ ACTIVATEDPLUGINS -- list of currently activated plugins * Syntax: =%<nop>ACTIVATEDPLUGINS%= * Expands to: %ACTIVATEDPLUGINS% * Related: [[#VarPLUGINDESCRIPTIONS][PLUGINDESCRIPTIONS]], [[#VarFAILEDPLUGINS][FAILEDPLUGINS]], [[#VarPLUGINVERSION2][PLUGINVERSION]] #VarATTACHURL ---+++ ATTACHURL -- full URL for attachments in the current topic * Syntax: =%<nop>ATTACHURL%= * Expands to: =%ATTACHURL%= * Example: If you attach a file you can refer to it as =%<nop>ATTACHURL%/image.gif= * Related: [[#VarATTACHURLPATH][ATTACHURLPATH]], [[#VarPUBURLPATH][PUBURLPATH]], [[#VarSCRIPTURL][SCRIPTURL]], FileAttachments #VarATTACHURLPATH ---+++ ATTACHURLPATH -- path of the attachment URL of the current topic * Syntax: =%<nop>ATTACHURLPATH%= * Expands to: =%ATTACHURLPATH%= * Related: [[#VarATTACHURL][ATTACHURL]], [[#VarPUBURL][PUBURL]], FileAttachments #VarAUTHREALM ---+++ AUTHREALM -- authentication realm * String defined as {AuthRealm} in =configure=. This is used in certain password encodings, and in login templates as part of the login prompt. * Syntax: =%<nop>AUTHREALM%= * Expands to: %AUTHREALM% * Related: TWikiUserAuthentication, [[#VarSESSIONID][SESSIONID]], [[#VarSESSIONVAR][SESSIONVAR]], [[#VarLOGIN][LOGIN]], [[#VarLOGOUT][LOGOUT]], [[#VarSESSION_VARIABLE][SESSION_VARIABLE]] #VarBASETOPIC ---+++ BASETOPIC -- base topic where an INCLUDE started * The name of the topic where a single or nested INCLUDE started - same as =%<nop>TOPIC%= if there is no INCLUDE * Syntax: =%<nop>BASETOPIC%= * Related: [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarINCLUDE][INCLUDE]], [[#VarTOPIC][TOPIC]] #VarBASEWEB ---+++ 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 =%<nop>WEB%= in case there is no include. * Syntax: =%<nop>BASEWEB%= * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], [[#VarINCLUDE][INCLUDE]], [[#VarWEB][WEB]] #VarDATE ---+++ DATE -- signature format date * Syntax: =%<nop>DATE%= * Expands to: =%DATE%= * %X% Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates#TemplateTopicsVars for details. * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME2][GMTIME{"format"}]], [[#VarSERVERTIME][SERVERTIME]] #VarDISPLAYTIME ---+++ DISPLAYTIME -- display time * Syntax: =%<nop>DISPLAYTIME%= * Expands to: =%DISPLAYTIME%= * Related: [[#VarDISPLAYTIME2][DISPLAYTIME{"format"}]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]] #VarDISPLAYTIME2 ---+++ DISPLAYTIME{"format"} -- formatted display time * Formatted time - either GMT or Local server time, depending on setting in [[%SCRIPTURL{"configure"}%][configure]]. Same format qualifiers as =%<nop>GMTIME%= * Syntax: =%<nop>DISPLAYTIME{"format"}%= * Example: =%<nop>DISPLAYTIME{"$hou:$min"}%= expands to =%DISPLAYTIME{"$hou:$min"}%= * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]] #VarENCODE ---+++ ENCODE{"string"} -- encodes a string * Syntax: =%<nop>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: =%<nop>ENCODE{"spaced name"}%= expands to =%ENCODE{"spaced name"}%= * Related: [[#VarURLPARAM][URLPARAM]] #VarENDSECTION ---+++ ENDSECTION{"name"} -- marks the end of a named section * Syntax: =%<nop>ENDSECTION{"name"}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="name"= | Name of the section. Must be unique inside a topic, and must match with a previous %<nop>SECTION% variable. | Mandatory parameter without a default | * Related: [[#VarINCLUDE][INCLUDE]], [[#VarSECTION][SECTION]], [[#VarSTARTINCLUDE][STARTINCLUDE]], [[#VarSTOPINCLUDE][STOPINCLUDE]] #VarFAILEDPLUGINS ---+++ FAILEDPLUGINS -- debugging for plugins that failed to load, and handler list * Syntax: =%<nop>FAILEDPLUGINS%= * Expands to: See TWikiPlugins#FAILEDPLUGINS * Related: [[#VarPLUGINDESCRIPTIONS][PLUGINDESCRIPTIONS]], [[#ACTIVATEDPLUGINS][ACTIVATEDPLUGINS]], [[#PLUGINVERSION2][PLUGINVERSION]] #VarFORMFIELD ---+++ FORMFIELD{"format"} -- renders a field in the form attached to some topic * Syntax: =%<nop>FORMFIELD{"fieldname"}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="fieldname"= | The name of a [[TWikiForms][TWiki form]] field | required | | =topic="..."= | Topic where form data is located. May be of the form =Web.<nop>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: =%<nop>FORMFIELD{"<nop>ProjectName" topic="Projects.<nop>SushiProject" default="(not set)" alttext="<nop>ProjectName field found"}%= * Related: [[#VarSEARCH][SEARCH]] #VarGMTIME ---+++ GMTIME -- GM time * Syntax: =%<nop>GMTIME%= * Expands to: =%GMTIME%= * %X% Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates#TemplateTopicsVars for details. * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME2][GMTIME{"format"}]], [[#VarSERVERTIME][SERVERTIME]] #VarGMTIME2 ---+++ GMTIME{"format"} -- formatted GM time * Syntax: =%<nop>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 | %GMTIME{"$iso"}% | | =$rcs= | RCS format timestamp | %GMTIME{"$rcs"}% | | =$http= | E-mail & http format timestamp | %GMTIME{"$http"}% | | =$epoch= | Number of seconds since 00:00 on 1st January, 1970 | %GMTIME{"$epoch"}% | * Variables can be shortened to 3 characters * Example: =%<nop>GMTIME{"$day $month, $year - $hour:$min:$sec"}%= expands to =%GMTIME{"$day $month, $year - $hour:$min:$sec"}%= * %X% Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates#TemplateTopicsVars for details. * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]] #VarHOMETOPIC ---+++ HOMETOPIC -- home topic in each web * Syntax: =%<nop>HOMETOPIC%= * Expands to: =%HOMETOPIC%=, renders as [[%HOMETOPIC%]] * Related: [[#VarNOTIFYTOPIC][NOTIFYTOPIC]], [[#VarSTATISTICSTOPIC][STATISTICSTOPIC]], [[#VarTOPIC][TOPIC]] #VarHTTP ---+++ 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: =%<nop>HTTP%= * Syntax: =%<nop>HTTP{'Header-name'}%= * Examples: | =%<nop>HTTP%= | %HTTP% | | =%<nop>HTTP{"Accept-language"}%= | %HTTP{"Accept-language"}% | | =%<nop>HTTP{"User-Agent"}%= | %HTTP{"User-Agent"}% | * 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: [[#VarHTTPS][HTTPS]], [[#VarREMOTEADDR][REMOTE_ADDR]], [[#VarREMOTEPORT][REMOTE_PORT]], [[#VarREMOTEUSER][REMOTE_USER]] #VarHTTPS ---+++ HTTPS -- get HTTPS headers * The same as %<nop>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: =%<nop>HTTPS%= * Syntax: =%<nop>HTTPS{'Header-name'}%= * Related: [[#VarHTTP][HTTP]], [[#VarREMOTEADDR][REMOTE_ADDR]], [[#VarREMOTEPORT][REMOTE_PORT]], [[#VarREMOTEUSER][REMOTE_USER]] #VarHTTPHOST ---+++ HTTP_HOST -- environment variable * Syntax: =%<nop>HTTP_HOST%= * Expands to: =%HTTP_HOST%= * Related: [[#VarREMOTEADDR][REMOTE_ADDR]], [[#VarREMOTEPORT][REMOTE_PORT]], [[#VarREMOTEUSER][REMOTE_USER]] #VarICON ---+++ ICON{"name"} -- small documentation graphic or icon of common attachment types * Small graphic (commonly 16x16 pixels) used to enhance topics. Specify the name of the graphic. * A set of 16x16 pixel icons of common attachment types is provided. Specify file type only, file name, or full path name. * Syntax: =%<nop>ICON{"name"}%= or =%<nop>ICON{"type"}%= * Graphic samples: %ICON{"arrowbright"}% =arrowbright=, %ICON{"bubble"}% =bubble=, %ICON{"choice-yes"}% =choice-yes=, %ICON{"hand"}% =hand= * Filetype samples: %ICON{"bmp"}% =bmp=, %ICON{"doc"}% =doc=, %ICON{"gif"}% =gif=, %ICON{"hlp"}% =hlp=, %ICON{"html"}% =html=, %ICON{"mp3"}% =mp3=, %ICON{"pdf"}% =pdf=, %ICON{"ppt"}% =ppt=, %ICON{"txt"}% =txt=, %ICON{"xls"}% =xls=, %ICON{"xml"}% =xml=, %ICON{"zip"}% =zip= * Example: =%<nop>ICON{"info"}%= expands to %ICON{"info"}% * Related: %WIKIPREFSTOPIC%, FileAttachments, TWikiDocGraphics #VarICONPATH ---+++ ICONPATH{"name"} -- url path of small documentation graphic or icon of common attachment types * See [[#VarICON][ICON]] * Syntax: =%<nop>ICONPATH{"name"}%= or =%<nop>ICONPATH{"type"}%= * Example: =%<nop>ICONPATH{"info"}%= expands to =%ICONPATH{"info"}%= which renders as %ICONPATH{"info"}% * Related: %WIKIPREFSTOPIC%, FileAttachments, TWikiDocGraphics #VarIF ---+++ IF{"condition" ...} -- simple conditionals * Syntax: =%<nop>IF{"CONDITION" then="THEN" else="ELSE"}%= * In the example above, if =CONDITION= evaluates to =TRUE=, then =THEN= will be shown; otherwise =ELSE= will be shown. * Related: IfStatements has more information on how to write =%<nop>IF{}%= statements * Related: [[SpreadSheetPlugin#FuncIF][$IF()]] of SpreadSheetPlugin #VarINCLUDE ---+++ INCLUDE{"page"} -- include other topic or web page * Syntax: =%<nop>INCLUDE{"page" ...}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="SomeTopic"= | The name of a topic located in the current web, i.e. =%<nop>INCLUDE{"WebNotify"}%= | | | ="Web.Topic"= | A topic in another web, i.e. =%<nop>INCLUDE{"%TWIKIWEB%.SiteMap"}%= | | | ="http://..."= | A full qualified URL, i.e. =%<nop>INCLUDE{"http://twiki.org:80/index.html"}%=. Supported content types are =text/html= and =text/plain=. <br /> %I% if the URL resolves to an attachment file on the server this will _automatically_ translate to a server-side include. | | | =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%= [[TWikiPreferences][preferences]] setting | | =section="name"= | Includes only the specified section, as defined in the included topic by the [[#VarSECTION][SECTION]] and [[#VarENDSECTION][ENDSECTION]] variables| | | =PARONE="val 1"%BR% 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 =%<nop>PARONE%= and =%<nop>PARTWO%= being defined within the included topic. | | * Examples: See IncludeTopicsAndWebPages * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], [[#VarSTARTINCLUDE][STARTINCLUDE]], [[#VarSTOPINCLUDE][STOPINCLUDE]], [[#VarSECTION][SECTION]], [[#VarENDSECTION][ENDSECTION]] #VarINCLUDINGTOPIC ---+++ INCLUDINGTOPIC -- name of topic that includes current topic * The name of the topic that includes the current topic - same as =%<nop>TOPIC%= in case there is no include * Syntax: =%<nop>INCLUDINGTOPIC%= * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], [[#VarINCLUDE][INCLUDE]], [[#VarTOPIC][TOPIC]] #VarINCLUDINGWEB ---+++ INCLUDINGWEB -- web that includes current topic * The web name of the topic that includes the current topic - same as =%<nop>WEB%= if there is no INCLUDE. * Syntax: =%<nop>INCLUDINGWEB%= * Related: [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarINCLUDE][INCLUDE]], [[#VarWEB][WEB]] #VarLANGUAGES ---+++ 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: =%<nop>LANGUAGES{...}%= * Supported parameters: | *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. | #VarLOCALSITEPREFS ---+++ LOCALSITEPREFS -- web.topicname of site preferences topic * The full name of the local site preferences topic. This topic is read for preferences before %TWIKIWEB%.<nop>%TWIKIPREFSTOPIC% is read. * Syntax: =%<nop>LOCALSITEPREFS%= * Expands to: <nop>%LOCALSITEPREFS% #VarLOGIN ---+++ LOGIN -- present a full login link * Syntax: =%<nop>LOGIN%= * Expand to: %LOGIN% * Related: TWikiUserAuthentication, [[#VarSESSIONID][SESSIONID]], [[#VarSESSIONVAR][SESSIONVAR]], [[#VarLOGOUT][LOGOUT]], [[#VarSESSION_VARIABLE][SESSION_VARIABLE]] #VarLOGOUT ---+++ LOGOUT -- present a full logout link * Syntax: =%<nop>LOGOUT%= * Expand to: %LOGOUT% * Related: TWikiUserAuthentication, [[#VarSESSIONID][SESSIONID]], [[#VarSESSIONVAR][SESSIONVAR]], [[#VarLOGIN][LOGIN]], [[#VarSESSION_VARIABLE][SESSION_VARIABLE]] #VarMAKETEXT ---+++ MAKETEXT -- creates text using TWiki's I18N infrastructure * Syntax = =%<nop>MAKETEXT{"string" args="..."}= * Supported parameters: | *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_ | * Examples: * =%<nop>MAKETEXT{string="Notes:"}%= %BR% expands to %BR% <em> %MAKETEXT{string="Notes:"}% </em> * =%<nop>MAKETEXT{"Contact [_1] if you have any questions." args="%<nop>WIKIWEBMASTER%"}%= %BR% expands to %BR% <em> %MAKETEXT{"Contact [_1] if you have any questions." args="%WIKIWEBMASTER%"}% </em> * =%<nop>MAKETEXT{"Did you want to [<nop>[<nop>[<nop>_1]<nop>]<nop>[reset [_2]'s password]<nop>]<nop>?" args="TWiki.ResetPassword,%<nop>WIKIUSERNAME%"}%= %BR% expands to %BR% <em> %MAKETEXT{"Did you want to [[[_1]][reset [_2]'s password]]?" args="TWiki.ResetPassword,%WIKIUSERNAME%"}% </em> * __Notes:__ * that TWiki will translate the =string= to the current user's language _only_ if it has such string in its translation table for that language. * Amperstands (<code>&</code>) followed by one letter (one of a...z, A...Z) (say, =X=) in the translatable string will be translated to <code><span class='twikiAccessKey'>X</span></code>. 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 (<code>&&</code>): they will be transformed in just one. * translatable string starting with underscores (<code>_</code>) are reserved. You should not use translatable phrases starting with an underscore. #VarMAINWEB ---+++ MAINWEB -- name of Main web * The web containing %MAINWEB%.%WIKIUSERSTOPIC%, individual user topics and %MAINWEB%.TWikiGroups * Syntax: =%<nop>MAINWEB%= * Expands to: =%MAINWEB%= * Related: [[#VarTWIKIWEB][TWIKIWEB]] #VarMETA ---+++ 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: =%<nop>META{ "item" ...}%= * Parameters: | *Item* | *Options* | *Description* | | ="formfield"= | =name="..."= - name of the field. The field value can be shortened as described in %TWIKIWEB%.FormattedSearch for =$formfield= | Show a single form field | | ="form"= | _none_ | Generates the table showing the form fields. See [[TWikiDocumentation#Form_Templates][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. %BR% ==nowebhome="on"==: Suppress <nop>%HOMETOPIC%. %BR% ==prefix="..."==: Prefix that goes before parents, but only if there are parents, default =""=. %BR% ==suffix="..."==: Suffix, only appears if there are parents, default =""=. %BR% ==separator="..."==: Separator between parents, default is =" > "=. | Generates the parent link | * Related: [[#VarMETASEARCH][METASEARCH]] #VarMETASEARCH ---+++ METASEARCH -- special search of meta data * Syntax: =%<nop>METASEARCH{...}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | =type="topicmoved"= | What sort of search is required? <br /> ="topicmoved"= if search for a topic that may have been moved <br /> ="parent"= if searching for topics that have a specific parent i.e. its children <br /> ="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="%<nop>WEB%"= | Wiki web to search: A web, a list of webs separated by whitespace, or =all= webs. | current web | | =topic="%<nop>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 [[#VarSEARCH][SEARCH]]). | | | =value= | form field value, for =field= type searches. May be a regular expression (see [[#VarSEARCH][SEARCH]]). | | | =title="Title"= | Text that is prefixed to any search results | empty | | =default="none"= | Default text shown if no search hit | empty | * Example: =%<nop>METASEARCH{type="topicmoved" web="%<nop>WEB%" topic="%<nop>TOPIC%" title="This topic used to exist and was moved to: "}%= * Example: You may want to use this in WebTopicViewTemplate and WebTopicNonWikiTemplate:<br /> =%<nop>METASEARCH{type="parent" web="%<nop>WEB%" topic="%<nop>TOPIC%" title="Children: "}%= * Example: =%<nop>METASEARCH{type="field" name="Country" value="China"}%= * Related: [[#VarSEARCH][SEARCH]], [[#VarMETA][META]] %STOPINCLUDE% __Related Topics:__ UserDocumentationCategory
End of topic
Skip to actions
|
Back to top
E
dit
|
A
ttach
|
P
rintable
|
R
aw view
|
Backlinks:
We
b
,
A
l
l webs
|
H
istory
: r2
<
r1
|
M
ore topic actions
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding FS?
Send feedback