1 rizwank 1.1 %META:TOPICINFO{author="PeterThoeny" date="1096153194" format="1.0" version="1.2"}%
2 %META:TOPICPARENT{name="TWikiVariables"}%
3 __Note:__ This topic is included by TWikiVariables
4
5 -----
6 %STARTINCLUDE%
7
8 #VarATTACHURL
9 ---+++ ATTACHURL -- full URL for attachments in the current topic
10 * Syntax: =%<nop>ATTACHURL%=
11 * Expands to: =%ATTACHURL%=
12 * Example: If you attach a file you can refer to it as =%<nop>ATTACHURL%/image.gif=
13 * Related: [[#VarATTACHURLPATH][ATTACHURLPATH]], [[#VarPUBURLPATH][PUBURLPATH]], [[#VarSCRIPTURL][SCRIPTURL]], FileAttachments
14
15 #VarATTACHURLPATH
16 ---+++ ATTACHURLPATH -- path of the attachment URL of the current topic
17 * Syntax: =%<nop>ATTACHURLPATH%=
18 * Expands to: =%ATTACHURLPATH%=
19 * Related: [[#VarATTACHURL][ATTACHURL]], [[#VarPUBURL][PUBURL]], FileAttachments
20
21 #VarBASETOPIC
22 rizwank 1.1 ---+++ BASETOPIC -- base topic where an INCLUDE started
23 * The name of the topic where a single or nested INCLUDE started - same as =%<nop>TOPIC%= if there is no INCLUDE
24 * Syntax: =%<nop>BASETOPIC%=
25 * Related: [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarINCLUDE][INCLUDE]], [[#VarTOPIC][TOPIC]]
26
27 #VarBASEWEB
28 ---+++ BASEWEB -- base web where an INCLUDE started
29 * 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.
30 * Syntax: =%<nop>BASEWEB%=
31 * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], [[#VarINCLUDE][INCLUDE]], [[#VarWEB][WEB]]
32
33 #VarDISPLAYTIME
34 ---+++ DISPLAYTIME -- display time
35 * Syntax: =%<nop>DISPLAYTIME%=
36 * Expands to: =%DISPLAYTIME%=
37 * Related: [[#VarDISPLAYTIME2][DISPLAYTIME{"format"}]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]]
38
39 #VarDISPLAYTIME2
40 ---+++ DISPLAYTIME{"format"} -- formatted display time
41 * Formatted time - either GMT or Local server time, depending on setting in TWiki.cfg. Same format qualifiers as =%<nop>GMTIME%=
42 * Syntax: =%<nop>DISPLAYTIME{"format"}%=
43 rizwank 1.1 * Example: =%<nop>DISPLAYTIME{"$hou:$min"}%= expands to =%DISPLAYTIME{"$hou:$min"}%=
44 * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]]
45
46 #VarENCODE
47 ---+++ ENCODE{"string"} -- encodes a string
48 * Syntax: =%<nop>ENCODE{"string"}%=
49 * Supported parameters:
50 | *Parameter:* | *Description:* | *Default:* |
51 | ="string"= | String to encode | required (can be empty) |
52 | =type="entity"= | Encode special characters into HTML entities, like a double quote into =&#034;= | URL encoding |
53 | =type="url"= | Encode special characters for URL parameter use, like a double quote into =%22= | (this is the default) |
54 * Example: =%<nop>ENCODE{"spaced name"}%= expands to =%ENCODE{"spaced name"}%=
55 * Related: [[#VarURLPARAM][URLPARAM]]
56
57 #VarFORMFIELD
58 ---+++ FORMFIELD{"format"} -- renders a field in the form attached to some topic
59 * Syntax: =%<nop>FORMFIELD{"fieldname"}%=
60 * Supported parameters:
61 | *Parameter:* | *Description:* | *Default:* |
62 | ="fieldname"= | The name of a [[TWikiForms][TWiki form]] field | required |
63 | =topic="..."= | Topic where form data is located. May be of the form =Web.<nop>TopicName= | Current topic |
64 rizwank 1.1 | =format="..."= | Format string. =$value= expands to the field value | ="$value"= |
65 | =default="..."= | Text shown when no value is defined for the field | =""= |
66 | =alttext="..."= | Text shown when field is not found in the form | =""= |
67 * Example: =%<nop>FORMFIELD{"<nop>ProjectName" topic="Projects.<nop>SushiProject" default="(not set)" alttext="<nop>ProjectName field found"}%=
68 * Related: [[#VarSEARCH][SEARCH]]
69
70 #VarGMTIME
71 ---+++ GMTIME -- GM time
72 * Syntax: =%<nop>GMTIME%=
73 * Expands to: =%GMTIME%=
74 * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME2][GMTIME{"format"}]], [[#VarSERVERTIME][SERVERTIME]]
75
76 #VarGMTIME2
77 ---+++ GMTIME{"format"} -- formatted GM time
78 * Syntax: =%<nop>GMTIME{"format"}%=
79 * Supported variables:
80 | *Variable:* | *Unit:* | *Example* |
81 | =$seconds= | seconds | 59 |
82 | =$minutes= | minutes | 59 |
83 | =$hours= | hours | 23 |
84 | =$day= | day of month | 31 |
85 rizwank 1.1 | =$wday= | day of the Week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) | Thu |
86 | =$month= | month in ISO format | Dec |
87 | =$mo= | 2 digit month | 12 |
88 | =$year= | 4 digit year | 1999 |
89 | =$ye= | 2 digit year | 99 |
90 | =$tz= | either "GMT" (if set to gmtime), or "Local" (if set to servertime) | GMT |
91 | =$iso= | ISO format timestamp | %GMTIME{"$iso"}% |
92 | =$rcs= | RCS format timestamp | %GMTIME{"$rcs"}% |
93 | =$http= | E-mail & http format timestamp | %GMTIME{"$http"}% |
94 * Variables can be shortened to 3 characters
95 * Example: =%<nop>GMTIME{"$day $month, $year - $hour:$min:$sec"}%= expands to =%GMTIME{"$day $month, $year - $hour:$min:$sec"}%=
96 * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]]
97
98 #VarHOMETOPIC
99 ---+++ HOMETOPIC -- home topic in each web
100 * Syntax: =%<nop>HOMETOPIC%=
101 * Expands to: =%HOMETOPIC%=, renders as [[%HOMETOPIC%]]
102 * Related: [[#VarNOTIFYTOPIC][NOTIFYTOPIC]], [[#VarSTATISTICSTOPIC][STATISTICSTOPIC]], [[#VarTOPIC][TOPIC]]
103
104 #VarHTTPHOST
105 ---+++ HTTP_HOST -- environment variable
106 rizwank 1.1 * Syntax: =%<nop>HTTP_HOST%=
107 * Expands to: =%HTTP_HOST%=
108 * Related: [[#VarREMOTEADDR][REMOTE_ADDR]], [[#VarREMOTEPORT][REMOTE_PORT]], [[#VarREMOTEUSER][REMOTE_USER]]
109
110 #VarICON
111 ---+++ ICON{"type"} -- small icon of common attachment types
112 * Small 16x16 pixel icon of common attachment types. Specify file type only, file name, or full path name
113 * Syntax: =%<nop>ICON{"type"}%=
114 * 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=
115 * Example: =%<nop>ICON{"pdf"}%= expands to %ICON{"pdf"}%
116 * Related: %WIKIPREFSTOPIC%, FileAttachments, TWikiDocGraphics
117
118 #VarINCLUDE
119 ---+++ INCLUDE{"page"} -- include other topics or web pages
120 * Syntax: =%<nop>INCLUDE{"page" ...}%=
121 * Supported parameters:
122 | *Parameter:* | *Description:* | *Default:* |
123 | ="SomeTopic"= | The name of a topic located in the current web, i.e. =%<nop>INCLUDE{"WebNotify"}%= | |
124 | ="Web.Topic"= | A topic in another web, i.e. =%<nop>INCLUDE{"%TWIKIWEB%.SiteMap"}%= | |
125 | ="http://..."= | A full qualified URL, i.e. =%<nop>INCLUDE{"http://twiki.org/"}%= <br /> __Note__ if the URL resolves to an attachment file on the server this will _automatically_ translate to a server-side include. | |
126 | =pattern="..."= | A RegularExpression pattern to include a subset of a topic or page | none |
127 rizwank 1.1 | =rev="1.2"= | Include a previous topic revision; N/A for URLs | top revision |
128 | =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) | =%<nop>INCLUDEWARNING%= [[TWikiPreferences][preferences]] setting |
129 * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], IncludeTopicsAndWebPages, [[#VarSTARTINCLUDE][STARTINCLUDE]], [[#VarSTOPINCLUDE][STOPINCLUDE]],
130
131 #VarINCLUDINGTOPIC
132 ---+++ INCLUDINGTOPIC -- name of topic that includes current topic
133 * The name of the topic that includes the current topic - same as =%<nop>TOPIC%= in case there is no include
134 * Syntax: =%<nop>INCLUDINGTOPIC%=
135 * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], [[#VarINCLUDE][INCLUDE]], [[#VarTOPIC][TOPIC]]
136
137
138 #VarINCLUDINGWEB
139 ---+++ INCLUDINGWEB -- web that includes current topic
140 * The web name of the topic that includes the current topic - same as =%<nop>WEB%= if there is no INCLUDE.
141 * Syntax: =%<nop>INCLUDINGWEB%=
142 * Related: [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarINCLUDE][INCLUDE]], [[#VarWEB][WEB]]
143
144 #VarMAINWEB
145 ---+++ MAINWEB -- name of Main web
146 * The web containing %MAINWEB%.%WIKIUSERSTOPIC%, %MAINWEB%.OfficeLocations and %MAINWEB%.TWikiGroups
147 * Syntax: =%<nop>MAINWEB%=
148 rizwank 1.1 * Expands to: =%MAINWEB%=
149 * Related: [[#VarTWIKIWEB][TWIKIWEB]]
150
151 #VarMETASEARCH
152 ---+++ METASEARCH -- special search of meta data
153 * Syntax: =%<nop>METASEARCH{...}%=
154 * Supported parameters:
155 | *Parameter:* | *Description:* | *Default:* |
156 | =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 | required |
157 | =web="%<nop>WEB%"= | Wiki web to search: A web, a list of webs separated by whitespace, or =all= webs. | current web |
158 | =topic="%<nop>TOPIC%"= | The topic the search relates to | current topic |
159 | =title="Title"= | Text that is prefixed to any search results | empty |
160 | =default="none"= | Default text shown if no search hit | empty |
161 * Example: =%<nop>METASEARCH{type="topicmoved" web="%<nop>WEB%" topic="%<nop>TOPIC%" title="This topic used to exist and was moved to: "}%=
162 * Example: You may want to use this in WebTopicViewTemplate and WebTopicNonWikiTemplate:<br /> =%<nop>METASEARCH{type="parent" web="%<nop>WEB%" topic="%<nop>TOPIC%" title="Children: "}%=
163 * Related: [[#VarSEARCH][SEARCH]]
164 %STOPINCLUDE%
165
166 -- TWiki:Main.PeterThoeny - 14 Aug 2004
167
|