3 <li><a href="#TWiki Variables"> TWiki Variables</a><ul>
4 <li><a href="#Predefined Variables"> Predefined Variables</a><ul>
5 <li><a href="#ATTACHURL -- attachment URL of t"> ATTACHURL -- attachment URL of the current topic</a></li>
6 <li><a href="#ATTACHURLPATH -- path of the att"> ATTACHURLPATH -- path of the attachment URL of the current topic</a></li>
7 <li><a href="#BASETOPIC -- base topic where an"> BASETOPIC -- base topic where an INCLUDE started</a></li>
8 <li><a href="#BASEWEB -- base web where an INC"> BASEWEB -- base web where an INCLUDE started</a></li>
9 <li><a href="#DISPLAYTIME -- display time"> DISPLAYTIME -- display time</a></li>
10 <li><a href="#DISPLAYTIME{"format"} -- formatt"> DISPLAYTIME{"format"} -- formatted display time</a></li>
11 <li><a href="#ENCODE{"string"} -- encodes a st"> ENCODE{"string"} -- encodes a string</a></li>
12 <li><a href="#GMTIME -- GM time"> GMTIME -- GM time</a></li>
13 <li><a href="#GMTIME{"format"} -- formatted GM"> GMTIME{"format"} -- formatted GM time</a></li>
14 <li><a href="#HOMETOPIC -- home topic in each"> HOMETOPIC -- home topic in each web</a></li>
15 <li><a href="#HTTP_HOST -- environment variabl"> HTTP_HOST -- environment variable</a></li>
16 <li><a href="#ICON{"type"} -- small icon of co"> ICON{"type"} -- small icon of common attachment types</a></li>
17 <li><a href="#INCLUDE{"page"} -- include other"> INCLUDE{"page"} -- include other topics or web pages</a></li>
18 <li><a href="#INCLUDINGTOPIC -- name of topic"> INCLUDINGTOPIC -- name of topic that includes current topic</a></li>
19 <li><a href="#INCLUDINGWEB -- web that include"> INCLUDINGWEB -- web that includes current topic</a></li>
20 <li><a href="#MAINWEB -- name of Main web"> MAINWEB -- name of Main web</a></li>
21 <li><a href="#METASEARCH -- special search of"> METASEARCH -- special search of meta data</a></li>
22 <li><a href="#NOTIFYTOPIC -- name of the notif"> NOTIFYTOPIC -- name of the notify topic</a></li>
23 <li><a href="#PUBURL -- the base URL of attach"> PUBURL -- the base URL of attachments</a></li>
24 <li><a href="#PUBURLPATH -- the base URL path"> PUBURLPATH -- the base URL path of attachments</a></li>
25 <li><a href="#REMOTE_ADDR -- environment varia"> REMOTE_ADDR -- environment variable</a></li>
26 <li><a href="#REMOTE_PORT -- environment varia"> REMOTE_PORT -- environment variable</a></li>
27 <li><a href="#REMOTE_USER -- environment varia"> REMOTE_USER -- environment variable</a></li>
28 <li><a href="#SCRIPTURL -- script URL of %WIKI"> SCRIPTURL -- script URL of %WIKITOOLNAME%</a></li>
29 <li><a href="#SCRIPTURLPATH -- script URL path"> SCRIPTURLPATH -- script URL path of %WIKITOOLNAME%</a></li>
30 <li><a href="#SCRIPTSUFFIX -- script suffix"> SCRIPTSUFFIX -- script suffix</a></li>
31 <li><a href="#SEARCH{"text"} -- search content"> SEARCH{"text"} -- search content</a></li>
32 <li><a href="#SERVERTIME -- server time"> SERVERTIME -- server time</a></li>
33 <li><a href="#SERVERTIME{"format"} -- formatte"> SERVERTIME{"format"} -- formatted server time</a></li>
34 <li><a href="#SPACEDTOPIC -- topic name, space"> SPACEDTOPIC -- topic name, spaced and encoded</a></li>
35 <li><a href="#STARTINCLUDE -- start position o"> STARTINCLUDE -- start position of topic text if included</a></li>
36 <li><a href="#STATISTICSTOPIC -- name of stati"> STATISTICSTOPIC -- name of statistics topic</a></li>
37 <li><a href="#STOPINCLUDE -- end position of t"> STOPINCLUDE -- end position of topic text if included</a></li>
38 <li><a href="#TOC -- table of contents of curr"> TOC -- table of contents of current topic</a></li>
39 <li><a href="#TOC{"Topic"} -- table of content"> TOC{"Topic"} -- table of contents</a></li>
40 <li><a href="#TOPIC -- name of current topic"> TOPIC -- name of current topic</a></li>
41 <li><a href="#TOPICLIST{"format"} -- topic ind"> TOPICLIST{"format"} -- topic index of a web</a></li>
42 <li><a href="#TWIKIWEB -- name of TWiki docume"> TWIKIWEB -- name of TWiki documentation web</a></li>
43 <li><a href="#URLPARAM{"name"} -- get value of"> URLPARAM{"name"} -- get value of a URL parameter</a></li>
44 <li><a href="#USERNAME -- your login username"> USERNAME -- your login username</a></li>
45 <li><a href="#VAR{"NAME" web="Web"} -- get a p"> VAR{"NAME" web="Web"} -- get a preference value from another web </a></li>
46 <li><a href="#WEB -- name of current web"> WEB -- name of current web</a></li>
47 <li><a href="#WEBLIST{"format"} -- index of al"> WEBLIST{"format"} -- index of all webs</a></li>
48 <li><a href="#WEBPREFSTOPIC -- name of web pre"> WEBPREFSTOPIC -- name of web preferences topic</a></li>
49 <li><a href="#WIKIHOMEURL -- site home URL"> WIKIHOMEURL -- site home URL</a></li>
50 <li><a href="#WIKINAME -- your Wiki username"> WIKINAME -- your Wiki username</a></li>
51 <li><a href="#WIKIPREFSTOPIC -- name of site-w"> WIKIPREFSTOPIC -- name of site-wide preferences topic</a></li>
52 <li><a href="#WIKITOOLNAME -- name of your TWi"> WIKITOOLNAME -- name of your TWiki site</a></li>
53 <li><a href="#WIKIUSERNAME -- your Wiki userna"> WIKIUSERNAME -- your Wiki username with web prefix</a></li>
54 <li><a href="#WIKIUSERSTOPIC -- name of topic"> WIKIUSERSTOPIC -- name of topic listing all registers users</a></li>
55 <li><a href="#WIKIVERSION -- the version of th"> WIKIVERSION -- the version of the installed TWiki engine</a></li>
58 <li><a href="#Preferences Variables"> Preferences Variables</a></li>
59 <li><a href="#Setting Preferences"> Setting Preferences</a></li>
60 <li><a href="#Creating Custom Variables"> Creating Custom Variables</a></li>
66 # <a name="TWiki Variables"></a> TWiki Variables
68 _Special text strings expand on the fly to display user data or system info_
70 TWikiVariables are text strings - `%VARIABLE%` - that expand into content whenever a page is opened. When a topic is rendered for viewing, `VARIABLES` are replaced by data, either user-entered, or info automatically generated by TWiki (like the date, or the current username). There are predefined variables, and Preference variables that you configure. You can also define custom variables, with new names and values.
72 **_Note:_** To leave a variable unexpanded, preceed it with an exclamation point, e.g. type `!%TOPIC%` to get %TOPIC%.
74 ## <a name="Predefined Variables"></a> Predefined Variables
76 Most predefined variables return values that were either set in the <code>**lib/twiki.cfg**</code> file, when TWiki was installed, or taken from server info (like current username, or date and time). Many of the variables let you format the appearance of the display results.
78 - %T% **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 <code>**%INCLUDINGTOPIC%**</code>, <code>**%INCLUDE%**</code>, and the mighty <code>**%SEARCH%**</code>.
80 This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the following variables (enclosed in <code>**%**</code> percent signs):
82 <a name="VarATTACHURL"></a>
84 ### <a name="ATTACHURL -- attachment URL of t"></a> ATTACHURL -- attachment URL of the current topic
86 - Syntax: `%ATTACHURL%`
87 - Expands to: `http://www.dementia.org/twiki//view`
88 - Example: If you attach a file you can refer to it as `%ATTACHURL%/image.gif`
89 - Related: [[ATTACHURLPATH|Main/WebHome#VarATTACHURLPATH]], [[PUBURLPATH|Main/WebHome#VarPUBURLPATH]], [[SCRIPTURL|Main/WebHome#VarSCRIPTURL]], [[FileAttachments]]
91 <a name="VarATTACHURLPATH"></a>
93 ### <a name="ATTACHURLPATH -- path of the att"></a> ATTACHURLPATH -- path of the attachment URL of the current topic
95 - Syntax: `%ATTACHURLPATH%`
96 - Expands to: `http://www.dementia.org/twiki//view`
97 - Related: [[ATTACHURL|Main/WebHome#VarATTACHURL]], [[PUBURL|Main/WebHome#VarPUBURL]], [[FileAttachments]]
99 <a name="VarBASETOPIC"></a>
101 ### <a name="BASETOPIC -- base topic where an"></a> BASETOPIC -- base topic where an INCLUDE started
103 - The name of the topic where a single or nested INCLUDE started - same as `%TOPIC%` if there is no INCLUDE
104 - Syntax: `%BASETOPIC%`
105 - Related: [[BASEWEB|Main/WebHome#VarBASEWEB]], [[INCLUDINGTOPIC|Main/WebHome#VarINCLUDINGTOPIC]], [[INCLUDE|Main/WebHome#VarINCLUDE]], [[TOPIC|Main/WebHome#VarTOPIC]]
107 <a name="VarBASEWEB"></a>
109 ### <a name="BASEWEB -- base web where an INC"></a> BASEWEB -- base web where an INCLUDE started
111 - 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.
112 - Syntax: `%BASEWEB%`
113 - Related: [[BASETOPIC|Main/WebHome#VarBASETOPIC]], [[INCLUDINGWEB|Main/WebHome#VarINCLUDINGWEB]], [[INCLUDE|Main/WebHome#VarINCLUDE]], [[WEB|Main/WebHome#VarWEB]]
115 <a name="VarDISPLAYTIME"></a>
117 ### <a name="DISPLAYTIME -- display time"></a> DISPLAYTIME -- display time
119 - Syntax: `%DISPLAYTIME%`
120 - Expands to: `29 Jun 2010 - 15:45`
121 - Related: [[DISPLAYTIME{"format"}|Main/WebHome#VarDISPLAYTIME2]], [[GMTIME|Main/WebHome#VarGMTIME]], [[SERVERTIME|Main/WebHome#VarSERVERTIME]]
123 <a name="VarDISPLAYTIME2"></a>
125 ### <a name="DISPLAYTIME{"format"} -- formatt"></a> DISPLAYTIME\{"format"\} -- formatted display time
127 - Formatted time - either GMT or Local server time, depending on setting in TWiki.cfg. Same format qualifiers as `%GMTIME%`
128 - Syntax: `%DISPLAYTIME{"format"}%`
129 - Example: `%DISPLAYTIME{"$hou:$min"}%` expands to `15:45`
130 - Related: [[DISPLAYTIME|Main/WebHome#VarDISPLAYTIME]], [[GMTIME|Main/WebHome#VarGMTIME]], [[SERVERTIME|Main/WebHome#VarSERVERTIME]]
132 <a name="VarENCODE"></a>
134 ### <a name="ENCODE{"string"} -- encodes a st"></a> ENCODE\{"string"\} -- encodes a string
136 - Syntax: `%ENCODE{"string"}%`
137 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
139 <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
140 <th bgcolor="#99CCCC"><strong> Description: </strong></th>
141 <th bgcolor="#99CCCC"><strong> Default: </strong></th>
144 <td><code>"string"</code></td>
145 <td> String to encode </td>
146 <td> required (can be empty) </td>
149 <td><code>type="entity"</code></td>
150 <td> Encode special characters into HTML entities, like a double quote into <code>&#034;</code></td>
151 <td> URL encoding </td>
154 <td><code>type="url"</code></td>
155 <td> Encode special characters for URL parameter use, like a double quote into <code>%22</code></td>
156 <td> (this is the default) </td>
159 - Example: `%ENCODE{"spaced name"}%` expands to `spaced%20name`
160 - Related: [[URLPARAM|Main/WebHome#VarURLPARAM]]
162 <a name="VarGMTIME"></a>
164 ### <a name="GMTIME -- GM time"></a> GMTIME -- GM time
167 - Expands to: `29 Jun 2010 - 15:45`
168 - Related: [[DISPLAYTIME|Main/WebHome#VarDISPLAYTIME]], [[GMTIME{"format"}|Main/WebHome#VarGMTIME2]], [[SERVERTIME|Main/WebHome#VarSERVERTIME]]
170 <a name="VarGMTIME2"></a>
172 ### <a name="GMTIME{"format"} -- formatted GM"></a> GMTIME\{"format"\} -- formatted GM time
174 - Syntax: `%GMTIME{"format"}%`
175 - Supported variables: <table border="1" cellpadding="0" cellspacing="0">
177 <th bgcolor="#99CCCC"><strong> Variable: </strong></th>
178 <th bgcolor="#99CCCC"><strong> Unit: </strong></th>
179 <th bgcolor="#99CCCC"><strong> Example </strong></th>
182 <td><code>$seconds</code></td>
187 <td><code>$minutes</code></td>
192 <td><code>$hours</code></td>
197 <td><code>$day</code></td>
198 <td> day of month </td>
202 <td><code>$wday</code></td>
203 <td> day of the Week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) </td>
207 <td><code>$month</code></td>
208 <td> month in ISO format </td>
212 <td><code>$mo</code></td>
213 <td> 2 digit month </td>
217 <td><code>$year</code></td>
218 <td> 4 digit year </td>
222 <td><code>$ye</code></td>
223 <td> 2 digit year </td>
227 <td><code>$tz</code></td>
228 <td> either "GMT" (if set to gmtime), or "Local" (if set to servertime) </td>
232 <td><code>$iso</code></td>
233 <td> ISO format timestamp </td>
234 <td> 2010-06-29T15:45:36Z </td>
237 <td><code>$rcs</code></td>
238 <td> RCS format timestamp </td>
239 <td> 2010/06/29 15:45:36 </td>
242 <td><code>$http</code></td>
243 <td> E-mail & http format timestamp </td>
244 <td> Tue, 29 Jun 2010 15:45:36 GMT </td>
247 - Variables can be shortened to 3 characters
248 - Example: `%GMTIME{"$day $month, $year - $hour:$min:$sec"}%` expands to `29 Jun, 2010 - 15:45:36`
249 - Related: [[DISPLAYTIME|Main/WebHome#VarDISPLAYTIME]], [[GMTIME|Main/WebHome#VarGMTIME]], [[SERVERTIME|Main/WebHome#VarSERVERTIME]]
251 <a name="VarHOMETOPIC"></a>
253 ### <a name="HOMETOPIC -- home topic in each"></a><a name="HOMETOPIC -- home topic in each "></a> HOMETOPIC -- home topic in each web
255 - Syntax: `%HOMETOPIC%`
256 - Expands to: `WebHome`, renders as [[WebHome]]
257 - Related: [[NOTIFYTOPIC|Main/WebHome#VarNOTIFYTOPIC]], [[STATISTICSTOPIC|Main/WebHome#VarSTATISTICSTOPIC]], [[TOPIC|Main/WebHome#VarTOPIC]]
259 <a name="VarHTTPHOST"></a>
261 ### <a name="HTTP_HOST -- environment variabl"></a> HTTP\_HOST -- environment variable
263 - Syntax: `%HTTP_HOST%`
265 - Related: [[REMOTE_ADDR|Main/WebHome#VarREMOTEADDR]], [[REMOTE_PORT|Main/WebHome#VarREMOTEPORT]], [[REMOTE_USER|Main/WebHome#VarREMOTEUSER]]
267 <a name="VarICON"></a>
269 ### <a name="ICON{"type"} -- small icon of co"></a> ICON\{"type"\} -- small icon of common attachment types
271 - Small 16x16 pixel icon of common attachment types. Specify file type only, file name, or full path name
272 - Syntax: `%ICON{"type"}%`
273 - Samples: <img src="http://www.dementia.org/twiki//view/Main/WebHome/bmp.gif" width="16" height="16" alt="bmp" /> `bmp`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/doc.gif" width="16" height="16" alt="doc" /> `doc`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/gif.gif" width="16" height="16" alt="gif" /> `gif`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/hlp.gif" width="16" height="16" alt="hlp" /> `hlp`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/html.gif" width="16" height="16" alt="html" /> `html`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/mp3.gif" width="16" height="16" alt="mp3" /> `mp3`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/pdf.gif" width="16" height="16" alt="pdf" /> `pdf`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/ppt.gif" width="16" height="16" alt="ppt" /> `ppt`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/txt.gif" width="16" height="16" alt="txt" /> `txt`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/xls.gif" width="16" height="16" alt="xls" /> `xls`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/xml.gif" width="16" height="16" alt="xml" /> `xml`, <img src="http://www.dementia.org/twiki//view/Main/WebHome/zip.gif" width="16" height="16" alt="zip" /> `zip`
274 - Example: `%ICON{"pdf"}%` expands to <img src="http://www.dementia.org/twiki//view/Main/WebHome/pdf.gif" width="16" height="16" alt="pdf" />
275 - Related: [[TWikiPreferences]], [[FileAttachments]], [[TWikiDocGraphics]]
277 <a name="VarINCLUDE"></a>
279 ### <a name="INCLUDE{"page"} -- include other"></a> INCLUDE\{"page"\} -- include other topics or web pages
281 - Syntax: `%INCLUDE{"page" ...}%`
282 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
284 <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
285 <th bgcolor="#99CCCC"><strong> Description: </strong></th>
286 <th bgcolor="#99CCCC"><strong> Default: </strong></th>
289 <td><code>"SomeTopic"</code></td>
290 <td> The name of a topic located in the current web, i.e. <code>%INCLUDE{"WebNotify"}%</code></td>
294 <td><code>"Web.Topic"</code></td>
295 <td> A topic in another web, i.e. <code>%INCLUDE{"TWiki.SiteMap"}%</code></td>
299 <td><code>"http://..."</code></td>
300 <td> A full qualified URL, i.e. <code>%INCLUDE{"http://twiki.org/"}%</code></td>
304 <td><code>pattern="..."</code></td>
305 <td> A [[Main/RegularExpression]] pattern to include a subset of a topic or page </td>
309 <td><code>rev="1.2"</code></td>
310 <td> Include a previous topic revision; N/A for URLs </td>
311 <td> top revision </td>
314 <td><code>warn="off"</code></td>
315 <td> Warn if topic include fails: Fail silently (if <code>off</code>); output default warning (if set to <code>on</code>); else, output specific text (use <code>$topic</code> for topic name) </td>
316 <td><code>%INCLUDE- WARNING%</code> [[Main/TWikiPreferences]] setting </td>
319 - Related: [[BASETOPIC|Main/WebHome#VarBASETOPIC]], [[BASEWEB|Main/WebHome#VarBASEWEB]], [[INCLUDINGTOPIC|Main/WebHome#VarINCLUDINGTOPIC]], [[INCLUDINGWEB|Main/WebHome#VarINCLUDINGWEB]], [[IncludeTopicsAndWebPages]]
321 <a name="VarINCLUDINGTOPIC"></a>
323 ### <a name="INCLUDINGTOPIC -- name of topic"></a><a name="INCLUDINGTOPIC -- name of topic "></a> INCLUDINGTOPIC -- name of topic that includes current topic
325 - The name of the topic that includes the current topic - same as `%TOPIC%` in case there is no include
326 - Syntax: `%INCLUDINGTOPIC%`
327 - Related: [[BASETOPIC|Main/WebHome#VarBASETOPIC]], [[INCLUDINGWEB|Main/WebHome#VarINCLUDINGWEB]], [[INCLUDE|Main/WebHome#VarINCLUDE]], [[TOPIC|Main/WebHome#VarTOPIC]]
329 <a name="VarINCLUDINGWEB"></a>
331 ### <a name="INCLUDINGWEB -- web that include"></a> INCLUDINGWEB -- web that includes current topic
333 - The web name of the topic that includes the current topic - same as `%WEB%` if there is no INCLUDE.
334 - Syntax: `%INCLUDINGWEB%`
335 - Related: [[BASEWEB|Main/WebHome#VarBASEWEB]], [[INCLUDINGTOPIC|Main/WebHome#VarINCLUDINGTOPIC]], [[INCLUDE|Main/WebHome#VarINCLUDE]], [[WEB|Main/WebHome#VarWEB]]
337 <a name="VarMAINWEB"></a>
339 ### <a name="MAINWEB -- name of Main web"></a> MAINWEB -- name of Main web
341 - The web containing [[TWikiUsers]], [[OfficeLocations]] and [[TWikiGroups]]
342 - Syntax: `%MAINWEB%`
344 - Related: [[TWIKIWEB|Main/WebHome#VarTWIKIWEB]]
346 <a name="VarMETASEARCH"></a>
348 ### <a name="METASEARCH -- special search of"></a><a name="METASEARCH -- special search of "></a> METASEARCH -- special search of meta data
350 - Syntax: `%METASEARCH{...}%`
351 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
353 <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
354 <th bgcolor="#99CCCC"><strong> Description: </strong></th>
355 <th bgcolor="#99CCCC"><strong> Default: </strong></th>
358 <td><code>type="topicmoved"</code></td>
359 <td> What sort of search is required? <br /><code>"topicmoved"</code> if search for a topic that may have been moved <br /><code>"parent"</code> if searching for topics that have a specific parent i.e. its children </td>
363 <td><code>web="%WEB%"</code></td>
364 <td> Wiki web to search: A web, a list of webs separated by whitespace, or <code>all</code> webs. </td>
368 <td><code>topic="%TOPIC%"</code></td>
369 <td> The topic the search relates to </td>
373 <td><code>title="Title"</code></td>
374 <td> Text that is prepended to any search results </td>
378 - Example: `%METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}%`
379 - Example: You may want to use this in [[WebTopicViewTemplate]] and [[WebTopicNonWikiTemplate]]:<br />`%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%`
380 - Related: [[SEARCH|Main/WebHome#VarSEARCH]]
382 <a name="VarNOTIFYTOPIC"></a>
384 ### <a name="NOTIFYTOPIC -- name of the notif"></a> NOTIFYTOPIC -- name of the notify topic
386 - Syntax: `%NOTIFYTOPIC%`
387 - Expands to: `WebNotify`, renders as [[WebNotify]]
388 - Related: [[HOMETOPIC|Main/WebHome#VarHOMETOPIC]], [[STATISTICSTOPIC|Main/WebHome#VarSTATISTICSTOPIC]], [[TOPIC|Main/WebHome#VarTOPIC]]
390 <a name="VarPUBURL"></a>
392 ### <a name="PUBURL -- the base URL of attach"></a> PUBURL -- the base URL of attachments
395 - Expands to: `http://www.dementia.org/twiki//view`
396 - Example: You can refer to a file attached to another topic with `%PUBURL%/%WEB%/OtherTopic/image.gif`
397 - Related: [[ATTACHURL|Main/WebHome#VarATTACHURL]], [[PUBURLPATH|Main/WebHome#VarPUBURLPATH]], [[SCRIPTURL|Main/WebHome#VarSCRIPTURL]], [[FileAttachments]]
399 <a name="VarPUBURLPATH"></a>
401 ### <a name="PUBURLPATH -- the base URL path"></a><a name="PUBURLPATH -- the base URL path "></a> PUBURLPATH -- the base URL path of attachments
403 - Syntax: `%PUBURLPATH%`
404 - Expands to: `http://www.dementia.org/twiki//view`
405 - Related: [[ATTACHURL|Main/WebHome#VarATTACHURL]], [[PUBURL|Main/WebHome#VarPUBURL]], [[FileAttachments]]
407 <a name="VarREMOTEADDR"></a>
409 ### <a name="REMOTE_ADDR -- environment varia"></a> REMOTE\_ADDR -- environment variable
411 - Syntax: `%REMOTE_ADDR%`
413 - Related: [[HTTP_HOST|Main/WebHome#VarHTTPHOST]], [[REMOTE_PORT|Main/WebHome#VarREMOTEPORT]], [[REMOTE_USER|Main/WebHome#VarREMOTEUSER]]
415 <a name="VarREMOTEPORT"></a>
417 ### <a name="REMOTE_PORT -- environment varia"></a> REMOTE\_PORT -- environment variable
419 - Syntax: `%REMOTE_PORT%`
421 - Related: [[HTTP_HOST|Main/WebHome#VarHTTPHOST]], [[REMOTE_ADDR|Main/WebHome#VarREMOTEADDR]], [[REMOTE_USER|Main/WebHome#VarREMOTEUSER]]
423 <a name="VarREMOTEUSER"></a>
425 ### <a name="REMOTE_USER -- environment varia"></a> REMOTE\_USER -- environment variable
427 - Syntax: `%REMOTE_USER%`
429 - Related: [[HTTP_HOST|Main/WebHome#VarHTTPHOST]], [[REMOTE_ADDR|Main/WebHome#VarREMOTEADDR]], [[REMOTE_PORT|Main/WebHome#VarREMOTEPORT]], [[USERNAME|Main/WebHome#VarUSERNAME]], [[WIKINAME|Main/WebHome#VarWIKINAME]], [[WIKIUSERNAME|Main/WebHome#VarWIKIUSERNAME]]
431 <a name="VarSCRIPTURL"></a>
433 ### <a name="SCRIPTURL -- script URL of %WIKI"></a> SCRIPTURL -- script URL of %WIKITOOLNAME%
435 - Syntax: `%SCRIPTURL%`
436 - Expands to: `http://www.dementia.org/twiki/`
437 - Example: To get the authenticated version of current topic write `%SCRIPTURL%/viewauth%SCRIPTSUFFIX%/%WEB%/%TOPIC%` which expands to `http://www.dementia.org/twiki//viewauth/%WEB%/%TOPIC%`
438 - Related: [[PUBURL|Main/WebHome#VarPUBURL]], [[SCRIPTSUFFIX|Main/WebHome#VarSCRIPTSUFFIX]], [[SCRIPTURLPATH|Main/WebHome#VarSCRIPTURLPATH]]
440 <a name="VarSCRIPTURLPATH"></a>
442 ### <a name="SCRIPTURLPATH -- script URL path"></a> SCRIPTURLPATH -- script URL path of %WIKITOOLNAME%
444 - Syntax: `%SCRIPTURLPATH%`
445 - Expands to: `http://www.dementia.org/twiki/`
446 - Related: [[PUBURLPATH|Main/WebHome#VarPUBURLPATH]], [[SCRIPTURL|Main/WebHome#VarSCRIPTURL]]
448 <a name="VarSCRIPTSUFFIX"></a>
450 ### <a name="SCRIPTSUFFIX -- script suffix"></a> SCRIPTSUFFIX -- script suffix
452 - Some %WIKITOOLNAME% installations require a file extension for CGI scripts like `.pl` or `.cgi`
453 - Syntax: `%SCRIPTSUFFIX%`
455 - Related: [[SCRIPTURL|Main/WebHome#VarSCRIPTURL]]
457 <a name="VarSEARCH"></a>
459 ### <a name="SEARCH{"text"} -- search content"></a> SEARCH\{"text"\} -- search content
461 - Inline search, shows a search result embedded in a topic
462 - Syntax: `%SEARCH{"text" ...}%`
463 - Supported parameters: [1] <table border="1" cellpadding="0" cellspacing="0">
465 <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
466 <th bgcolor="#99CCCC"><strong> Description: </strong></th>
467 <th bgcolor="#99CCCC"><strong> Default: </strong></th>
470 <td><code>"text"</code></td>
471 <td> Search term. Is a keyword search, literal search or regular expression search, depending on the <code>type</code> parameter. [[Main/SearchHelp]] has more </td>
475 <td><code>search="text"</code></td>
476 <td> (Alternative to above) </td>
480 <td><code>web="Name"</code><br /><code>web="Main, Know"</code><br /><code>web="all"</code></td>
481 <td> Wiki web to search: A web, a list of webs separated by comma, or <code>all</code> webs. [2] </td>
482 <td> Current web </td>
485 <td><code>topic="WebPreferences"</code><br /><code>topic="*Bug"</code></td>
486 <td> Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. </td>
487 <td> All topics in a web </td>
490 <td><code>excludetopic="Web*"</code><br /><code>excludetopic="WebHome, WebChanges"</code></td>
491 <td> Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. </td>
495 <td><code>type="keyword"</code><br /><code>type="literal"</code><br /><code>type="regex"</code></td>
496 <td> Do a keyword search like <code>soap "web service" -shampoo</code>; a literal search like <code>web service</code>; or [[Main/RegularExpression]] search like <code>soap;web service;!shampoo</code></td>
497 <td><code>%SEARCHVAR- DEFAULTTYPE%</code> [[Main/TWikiPreferences]] setting (%SEARCHVARDEFAULTTYPE%) </td>
500 <td><code>scope="topic"</code><br /><code>scope="text"</code><br /><code>scope="all"</code></td>
501 <td> Search topic name (title); the text (body) of topic; or all (both) </td>
502 <td><code>"text"</code></td>
505 <td><code>order="topic"</code><br /><code>order="created"</code><br /><code>order="modified"</code><br /><code>order="editby"</code><br /><code>order=<br />Â "formfield(name)"</code></td>
506 <td> Sort the results of search by the topic names, topic creation time, last modified time, last editor, or named field of [[Main/TWikiForms]]. The sorting is done web by web; in case you want to sort across webs, create a [[Main/FormattedSearch]] table and sort it with [[Main/TablePlugin]]'s initsort </td>
507 <td> Sort by topic name </td>
510 <td><code>limit="all"</code><br /><code>limit="16"</code></td>
511 <td> Limit the number of results returned. This is done after sorting in case <code>order</code> is specified </td>
512 <td> All results </td>
515 <td><code>reverse="on"</code></td>
516 <td> Reverse the direction of the search </td>
517 <td> Ascending search </td>
520 <td><code>casesensitive="on"</code></td>
521 <td> Case sensitive search </td>
522 <td> Ignore case </td>
525 <td><code>nosummary="on"</code></td>
526 <td> Show topic title only </td>
527 <td> Show topic summary </td>
530 <td><code>bookview="on"</code></td>
531 <td>[[Main/BookView]] search, e.g. show complete topic text </td>
532 <td> Show topic summary </td>
535 <td><code>nosearch="on"</code></td>
536 <td> Suppress search string </td>
537 <td> Show search string </td>
540 <td><code>noheader="on"</code></td>
541 <td> Suppress search header <br /><span style="background: #FFB0B0"> <strong>Topics: Changed: By:</strong> </span></td>
542 <td> Show search header </td>
545 <td><code>nototal="on"</code></td>
546 <td> Do not show number of topics found </td>
547 <td> Show number </td>
550 <td><code>header="..."</code><br /><code>format="..."</code></td>
551 <td> Custom format results: see <strong>[[Main/FormattedSearch]]</strong> for usage, variables & examples </td>
552 <td> Results in table </td>
555 <td><code>expandvariables="on"</code></td>
556 <td> Expand variables before applying a [[Main/FormattedSearch]] on a search hit. Useful to show the expanded text, e.g. to show the result of a [[Main/SpreadSheetPlugin]] <code>%CALC{}%</code> instead of the formula </td>
560 <td><code>multiple="on"</code></td>
561 <td> Multiple hits per topic. Each hit can be [[Main/FormattedSearch]]. The last token is used in case of a regular expression ";" <em>and</em> search </td>
562 <td> Only one hit per topic </td>
565 <td><code>separator=", "</code></td>
566 <td> Line separator between hits </td>
567 <td> Newline <code>"$n"</code></td>
570 - Example: `%SEARCH{"wiki" web="Main" scope="topic"}%`
571 - Example with format: `%SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"%` _(displays results in a table with header - [[details|Main/FormattedSearch]])_
572 - %H% If the TWiki:Plugins.TablePlugin is installed, you may set a `%TABLE{}%` variable just before the `%SEARCH{}%` to alter the output of a search. Example: `%TABLE{ tablewidth="90%" }%`
573 - Related: [[METASEARCH|Main/WebHome#VarMETASEARCH]], [[TOPICLIST|Main/WebHome#VarTOPICLIST]], [[WEBLIST|Main/WebHome#VarWEBLIST]], [[FormattedSearch]]
575 - [1] **_Note_**: The search form uses identical names for input fields.
576 - [2] **_Note_**: A web can be excluded from a `web="all"` search if you define a `NOSEARCHALL=on` variable in its [[WebPreferences]]
578 <a name="VarSERVERTIME"></a>
580 ### <a name="SERVERTIME -- server time"></a> SERVERTIME -- server time
582 - Syntax: `%SERVERTIME%`
583 - Expands to: `29 Jun 2010 - 11:45`
584 - Related: [[DISPLAYTIME|Main/WebHome#VarDISPLAYTIME]], [[GMTIME|Main/WebHome#VarGMTIME]], [[SERVERTIME{"format"}|Main/WebHome#VarSERVERTIME2]]
586 <a name="VarSERVERTIME2"></a>
588 ### <a name="SERVERTIME{"format"} -- formatte"></a> SERVERTIME\{"format"\} -- formatted server time
590 - Same format qualifiers as `%GMTIME%`
591 - Syntax: `%SERVERTIME{"format"}%`
592 - Example: `%SERVERTIME{"$hou:$min"}%` expands to `11:45`
593 - Related: [[DISPLAYTIME|Main/WebHome#VarDISPLAYTIME]], [[GMTIME|Main/WebHome#VarGMTIME]], [[SERVERTIME|Main/WebHome#VarSERVERTIME]]
595 <a name="VarSPACEDTOPIC"></a>
597 ### <a name="SPACEDTOPIC -- topic name, space"></a> SPACEDTOPIC -- topic name, spaced and encoded
599 - The current topic name with added spaces, for regular expression search of Ref-By
600 - Syntax: `%SPACEDTOPIC%`
602 - Related: [[TOPIC|Main/WebHome#VarTOPIC]]
604 <a name="VarSTARTINCLUDE"></a>
606 ### <a name="STARTINCLUDE -- start position o"></a> STARTINCLUDE -- start position of topic text if included
608 - If present in included topic, start to include text from this location up to the end, or up to the location of the `%STOPINCLUDE%` variable. A normal view of the topic shows everyting exept the `%STARTINCLUDE%` variable itself.
609 - Syntax: `%STARTINCLUDE%`
610 - Related: [[INCLUDE|Main/WebHome#VarINCLUDE]], [[STOPINCLUDE|Main/WebHome#VarSTOPINCLUDE]]
612 <a name="VarSTATISTICSTOPIC"></a>
614 ### <a name="STATISTICSTOPIC -- name of stati"></a> STATISTICSTOPIC -- name of statistics topic
616 - Syntax: `%STATISTICSTOPIC%`
617 - Expands to: `WebStatistics`, renders as [[WebStatistics]]
618 - Related: [[HOMETOPIC|Main/WebHome#VarHOMETOPIC]], [[NOTIFYTOPIC|Main/WebHome#VarNOTIFYTOPIC]], [[TOPIC|Main/WebHome#VarTOPIC]]
620 <a name="VarSTOPINCLUDE"></a>
622 ### <a name="STOPINCLUDE -- end position of t"></a> STOPINCLUDE -- end position of topic text if included
624 - If present in included topic, stop to include text at this location and ignore the remaining text. A normal view of the topic shows everyting exept the `%STOPINCLUDE%` variable itself.
625 - Syntax: `%STOPINCLUDE%`
626 - Related: [[INCLUDE|Main/WebHome#VarINCLUDE]], [[STARTINCLUDE|Main/WebHome#VarSTARTINCLUDE]]
628 <a name="VarTOC"></a>
630 ### <a name="TOC -- table of contents of curr"></a> TOC -- table of contents of current topic
633 - Related: [[TOC{"SomeTopic"}|Main/WebHome#VarTOC2]]
635 <a name="VarTOC2"></a>
637 ### <a name="TOC{"Topic"} -- table of content"></a> TOC\{"Topic"\} -- table of contents
639 - Syntax: `%TOC{"SomeTopic" ...}%`
640 - Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in [[WikiSyntax]] (`"---++ text"`) and HTML (`"<h2>text</h2>"`) are taken into account. Any heading text after `"!!"` is excluded from the TOC; for example, write `"---+!! text"` if you do not want to list a header in the TOC
641 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
643 <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
644 <th bgcolor="#99CCCC"><strong> Description: </strong></th>
645 <th bgcolor="#99CCCC"><strong> Default: </strong></th>
648 <td><code>"TopicName"</code></td>
649 <td> topic name </td>
650 <td> Current topic </td>
653 <td><code>web="Name"</code></td>
654 <td> Name of web </td>
655 <td> Current web </td>
658 <td><code>depth="2"</code></td>
659 <td> Limit depth of headings shown in TOC </td>
663 <td><code>title="Some text"</code></td>
664 <td> Title to appear at top of TOC </td>
668 - Example: `%TOC{depth="2"}%`
669 - Example: `%TOC{"TWikiDocumentation" web="TWiki" title="Contents:"}%`
670 - Related: [[TOC|Main/WebHome#VarTOC]]
672 <a name="VarTOPIC"></a>
674 ### <a name="TOPIC -- name of current topic"></a> TOPIC -- name of current topic
677 - Expands to: `%TOPIC%`, renders as [[%TOPIC%|Main/TOPIC]]
678 - Related: [[BASETOPIC|Main/WebHome#VarBASETOPIC]], [[INCLUDINGTOPIC|Main/WebHome#VarINCLUDINGTOPIC]], [[TOPICLIST|Main/WebHome#VarTOPICLIST]], [[WEB|Main/WebHome#VarWEB]]
680 <a name="VarTOPICLIST"></a>
682 ### <a name="TOPICLIST{"format"} -- topic ind"></a> TOPICLIST\{"format"\} -- topic index of a web
684 - The "format" defines the format of one topic item. It may include variables: The `$name` variable gets expanded to the topic name; the `$web` variable gets expanded to the name of the web.
685 - Syntax: `%TOPICLIST{"format" ...}%`
686 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
688 <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
689 <th bgcolor="#99CCCC"><strong> Description: </strong></th>
690 <th bgcolor="#99CCCC"><strong> Default: </strong></th>
693 <td><code>"format"</code></td>
694 <td> Format of one line, may include <code>$name</code> and <code>$web</code> variables </td>
695 <td><code>"$name"</code></td>
698 <td><code>format="format"</code></td>
699 <td> (Alternative to above) </td>
700 <td><code>"$name"</code></td>
703 <td><code>separator=", "</code></td>
704 <td> line separator </td>
705 <td><code>"\n"</code> (new line) </td>
708 <td><code>web="Name"</code></td>
709 <td> Name of web </td>
710 <td> Current web </td>
713 - Example: `%TOPICLIST{" Â * $web.$name"}%` creates a bullet list of all topics
714 - Example: `%TOPICLIST{separator=", "}%` creates a comma separated list of all topics
715 - Example: `%TOPICLIST{" <option>$name</option>"}%` creates an option list (for drop down menus)
716 - Related: [[SEARCH|Main/WebHome#VarSEARCH]], [[WEBLIST|Main/WebHome#VarWEBLIST]]
718 <a name="VarTWIKIWEB"></a>
720 ### <a name="TWIKIWEB -- name of TWiki docume"></a> TWIKIWEB -- name of TWiki documentation web
722 - The web containing all documentation and site-wide preference settings for %WIKITOOLNAME%
723 - Syntax: `%TWIKIWEB%`
724 - Expands to: `TWiki`
725 - Related: [[MAINWEB|Main/WebHome#VarMAINWEB]]
727 <a name="VarURLPARAM"></a>
729 ### <a name="URLPARAM{"name"} -- get value of"></a> URLPARAM\{"name"\} -- get value of a URL parameter
731 - Returns the value of a URL parameter. Note that there is a risk that this variable could be misused for cross-scripting
732 - Syntax: `%URLPARAM{"name"}%`
733 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
735 <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
736 <th bgcolor="#99CCCC"><strong> Description: </strong></th>
737 <th bgcolor="#99CCCC"><strong> Default: </strong></th>
740 <td><code>"name"</code></td>
741 <td> The name of a URL parameter </td>
745 <td><code>default="..."</code></td>
746 <td> Default value in case parameter is empty or missing </td>
747 <td> empty string </td>
750 <td><code>newline="<br />"</code></td>
751 <td> Convert newlines in textarea to other delimiters </td>
752 <td> no conversion </td>
755 <td><code>encode="entity"</code></td>
756 <td> Encode special characters into HTML entities, like a double quote into <code>&#034;</code>. This is needed if text is put into an HTML form field </td>
757 <td> no encoding </td>
760 <td><code>encode="url"</code></td>
761 <td> Encode special characters for URL parameter use, like a double quote into <code>%22</code></td>
762 <td> no encoding </td>
765 <td><code>multiple="on"</code> %BR% <code>multiple="[[$item]]"</code></td>
766 <td> If set, gets all selected elements of a <code><select multiple="multiple"></code> tag. A format can be specified, with <code>$item</code> indicating the element, e.g. <code>multiple="Option: $item"</code></td>
767 <td> first element </td>
770 <td><code>separator=", "</code></td>
771 <td> Separator between multiple selections. Only relevant if multiple is specified </td>
772 <td><code>"\n"</code> (new line) </td>
775 - Example: `%URLPARAM{"skin"}%` returns `print` for a `.../view/%WEB%/%TOPIC%?skin=print` URL. [Test this](http://www.dementia.org/twiki//viewauth/%WEB%/%TOPIC%?skin=print#VarURLPARAM):
776 - Related: [[SEARCH|Main/WebHome#VarSEARCH]], [[FormattedSearch]]
778 <a name="VarUSERNAME"></a>
780 ### <a name="USERNAME -- your login username"></a> USERNAME -- your login username
782 - TWiki makes names available in three formats: USERNAME like `jsmith`, WIKINAME like `JohnSmith` and WIKIUSERNAME like `Main.JohnSmith`. A user is a [[TWikiGuest]] in case the topic is not authenticated
783 - Syntax: `%USERNAME%`
784 - Expands to: `admin`
785 - Related: [[REMOTE_USER|Main/WebHome#VarREMOTEUSER]], [[WIKINAME|Main/WebHome#VarWIKINAME]], [[WIKIUSERNAME|Main/WebHome#VarWIKIUSERNAME]], [[TWikiUserAuthentication]]
787 <a name="VarVAR"></a>
789 ### <a name="VAR{"NAME" web="Web"} -- get a p"></a> VAR\{"NAME" web="Web"\} -- get a preference value from another web
791 - Syntax: `%VAR{"NAME" web="Web"}%`
792 - Example: To get `%WEBBGCOLOR%` of the Main web write `%VAR{"WEBBGCOLOR" web="Main"}%`, which expands to ==
793 - Related: [[WEBPREFSTOPIC|Main/WebHome#VarWEBPREFSTOPIC]]
795 <a name="VarWEB"></a>
797 ### <a name="WEB -- name of current web"></a> WEB -- name of current web
800 - Expands to: `%WEB%`
801 - Related: [[BASEWEB|Main/WebHome#VarBASEWEB]], [[INCLUDINGWEB|Main/WebHome#VarINCLUDINGWEB]], [[TOPIC|Main/WebHome#VarTOPIC]]
803 <a name="VarWEBLIST"></a>
805 ### <a name="WEBLIST{"format"} -- index of al"></a> WEBLIST\{"format"\} -- index of all webs
807 - List of all webs. Hidden webs are excluded, e.g. webs with a `NOSEARCHALL=on` preference variable. The `"format"` defines the format of one web item. The `$name` variable gets expanded to the name of the web, `$qname` gets expanded to double quoted name, `$marker` to `marker` where web matches `selection`.
808 - Syntax: `%WEBLIST{"format" ...}%`
809 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
811 <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
812 <th bgcolor="#99CCCC"><strong> Description: </strong></th>
813 <th bgcolor="#99CCCC"><strong> Default: </strong></th>
816 <td><code>"format"</code></td>
817 <td> Format of one line, may include <code>$name</code> variable </td>
818 <td><code>"$name"</code></td>
821 <td><code>format="format"</code></td>
822 <td> (Alternative to above) </td>
823 <td><code>"$name"</code></td>
826 <td><code>separator=", "</code></td>
827 <td> line separator </td>
828 <td><code>"\n"</code> (new line) </td>
831 <td><code>webs="public"</code></td>
832 <td> comma sep list of Web, public expands to all non-hidden </td>
833 <td><code>"public"</code></td>
836 <td><code>marker="selected"</code></td>
837 <td> Text for <code>$marker</code> where item matches <code>selection</code>, otherwise equals <code>""</code></td>
838 <td><code>"selected"</code></td>
841 <td><code>selection="%WEB%"</code></td>
842 <td> Current value to be selected in list </td>
843 <td><code>section="%WEB%"</code></td>
846 - Example: `%WEBLIST{" Â * [[$name.WebHome]]"}%` creates a bullet list of all webs.
847 - Example: `%WEBLIST{"<option $marker value=$qname>$name</option>" webs="Trash,public" selection="%WEB%" separator=" "}%` Dropdown of all public Webs + Trash Web, current Web highlighted.
848 - Related: [[TOPICLIST|Main/WebHome#VarTOPICLIST]], [[SEARCH|Main/WebHome#VarSEARCH]]
850 <a name="VarWEBPREFSTOPIC"></a>
852 ### <a name="WEBPREFSTOPIC -- name of web pre"></a> WEBPREFSTOPIC -- name of web preferences topic
854 - Syntax: `%WEBPREFSTOPIC%`
855 - Expands to: `WebPreferences`, renders as [[WebPreferences]]
856 - Related: [[HOMETOPIC|Main/WebHome#VarHOMETOPIC]], [[WIKIPREFSTOPIC|Main/WebHome#VarWIKIPREFSTOPIC]], [[VAR|Main/WebHome#VarVAR]]
858 <a name="VarWIKIHOMEURL"></a>
860 ### <a name="WIKIHOMEURL -- site home URL"></a> WIKIHOMEURL -- site home URL
862 - The base URL of %WIKITOOLNAME%, is the link of the Home icon in the upper left corner, defined in TWiki.cfg
863 - Syntax: `%WIKIHOMEURL%`
864 - Expands to: `%WIKIHOMEURL%`
865 - Related: [[WIKITOOLNAME|Main/WebHome#VarWIKITOOLNAME]]
867 <a name="VarWIKINAME"></a>
869 ### <a name="WIKINAME -- your Wiki username"></a> WIKINAME -- your Wiki username
871 - The [[WikiName]] is the same as %USERNAME% if not defined in the [[TWikiUsers]] topic
872 - Syntax: `%WIKINAME%`
873 - Expands to: `admin`
874 - Related: [[REMOTE_USER|Main/WebHome#VarREMOTEUSER]], [[USERNAME|Main/WebHome#VarUSERNAME]], [[WIKIUSERNAME|Main/WebHome#VarWIKIUSERNAME]], [[WIKIUSERSTOPIC|Main/WebHome#VarWIKIUSERSTOPIC]]
876 <a name="VarWIKIPREFSTOPIC"></a>
878 ### <a name="WIKIPREFSTOPIC -- name of site-w"></a> WIKIPREFSTOPIC -- name of site-wide preferences topic
880 - Syntax: `%WIKIPREFSTOPIC%`
881 - Expands to: `TWikiPreferences`, renders as [[TWikiPreferences]]
882 - Related: [[HOMETOPIC|Main/WebHome#VarHOMETOPIC]], [[WEBPREFSTOPIC|Main/WebHome#VarWEBPREFSTOPIC]]
884 <a name="VarWIKITOOLNAME"></a>
886 ### <a name="WIKITOOLNAME -- name of your TWi"></a> WIKITOOLNAME -- name of your TWiki site
888 - Syntax: `%WIKITOOLNAME%`
889 - Expands to: `%WIKITOOLNAME%`
890 - Related: [[WIKIHOMEURL|Main/WebHome#VarWIKIHOMEURL]], [[WIKIVERSION|Main/WebHome#VarWIKIVERSION]]
892 <a name="VarWIKIUSERNAME"></a>
894 ### <a name="WIKIUSERNAME -- your Wiki userna"></a> WIKIUSERNAME -- your Wiki username with web prefix
896 - Your %WIKINAME% with Main web prefix, useful to point to your %WIKITOOLNAME% home page
897 - Syntax: `%WIKIUSERNAME%`
898 - Expands to: `Main.admin`, renders as Main.admin
899 - Related: [[REMOTE_USER|Main/WebHome#VarREMOTEUSER]], [[USERNAME|Main/WebHome#VarUSERNAME]], [[WIKINAME|Main/WebHome#VarWIKINAME]]
901 <a name="VarWIKIUSERSTOPIC"></a>
903 ### <a name="WIKIUSERSTOPIC -- name of topic"></a><a name="WIKIUSERSTOPIC -- name of topic "></a> WIKIUSERSTOPIC -- name of topic listing all registers users
905 - Syntax: `%WIKIUSERSTOPIC%`
906 - Expands to: `TWikiUsers`, with Main prefix renders as [[TWikiUsers]]
907 - Related: [[WIKIUSERNAME|Main/WebHome#VarWIKIUSERNAME]]
909 <a name="VarWIKIVERSION"></a>
911 ### <a name="WIKIVERSION -- the version of th"></a> WIKIVERSION -- the version of the installed TWiki engine
913 - Syntax: `%WIKIVERSION%`
914 - Expands to: `TWiki-4.1.2, Sat, 03 Mar 2007, build 13046`
915 - Related: [[WIKITOOLNAME|Main/WebHome#VarWIKITOOLNAME]]
917 <a name="PreferencesVariables"></a>
919 ## <a name="Preferences Variables"></a> Preferences Variables
921 Additional variables are defined in the preferences ( site-level ( **_SL_** ) in [[TWikiPreferences]], web-level ( **_WL_** ) in [[WebPreferences]] of each web, and user level ( **_UL_** ) preferences in individual user topics):
923 <table align="center" border="1" cellpadding="2" cellspacing="0" style="background-color: #f5f5f5">
925 <th width="160"> Variable: </th>
930 <td><code>%ALLOWTOPICCHANGE%</code></td>
931 <td><strong><em>(any topic)</em></strong></td>
932 <td> List of users and groups who are <strong>allowed</strong> to change the current topic. (More in [[Main/TWikiAccessControl]]) </td>
935 <td><code>%ALLOWTOPICRENAME%</code></td>
936 <td><strong><em>(any topic)</em></strong></td>
937 <td> List of users and groups who are <strong>allowed</strong> to rename the current topic. (More in [[Main/TWikiAccessControl]]) </td>
940 <td><code>%ALLOWWEBCHANGE%</code></td>
941 <td><strong><em>WL</em></strong></td>
942 <td> List of users and groups who are <strong>allowed</strong> to change topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
945 <td><code>%ALLOWWEBRENAME%</code></td>
946 <td><strong><em>WL</em></strong></td>
947 <td> List of users and groups who are <strong>allowed</strong> to rename topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
950 <td><code>%ATTACHLINKBOX%</code></td>
951 <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
952 <td> Default state of the link check box in the attach file page. Check box is initially checked if value is set to <code>CHECKED</code> , unchecked if empty. If checked, a link is created to the attached file at the end of the topic. Value is: <b><code>%ATTACHLINKBOX%</code></b></td>
955 <td><code>%DENYTOPICCHANGE%</code></td>
956 <td><strong><em>(any topic)</em></strong></td>
957 <td> List of users and groups who are <strong>not allowed</strong> to change the current topic. (More in [[Main/TWikiAccessControl]]) </td>
960 <td><code>%DENYTOPICRENAME%</code></td>
961 <td><strong><em>(any topic)</em></strong></td>
962 <td> List of users and groups who are <strong>not allowed</strong> to rename the current topic. (More in [[Main/TWikiAccessControl]]) </td>
965 <td><code>%DENYWEBCHANGE%</code></td>
966 <td><strong><em>WL</em></strong></td>
967 <td> List of users and groups who are <strong>not allowed</strong> to change topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
970 <td><code>%DENYWEBRENAME%</code></td>
971 <td><strong><em>WL</em></strong></td>
972 <td> List of users and groups who are <strong>not allowed</strong> to rename topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
975 <td><code>%DONTNOTIFYCHECKBOX%</code></td>
976 <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
977 <td> Default state of the "Minor Changes, Don't Notify" ([[Main/DontNotify]]) check box in preview. Check box is initially checked if <code>Set DONTNOTIFYCHECKBOX = checked="checked"</code>, or unchecked if empty. Value is: <b><code>%DONTNOTIFYCHECKBOX%</code></b></td>
980 <td><code>%EDITBOXHEIGHT%</code></td>
981 <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
982 <td> Vertical size of edit box, is <b> <code>%EDITBOXHEIGHT%</code> </b></td>
985 <td><code>%EDITBOXWIDTH%</code></td>
986 <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
987 <td> Horizontal size of edit box, is <b> <code>%EDITBOXWIDTH%</code> </b></td>
990 <td><code>%EDITBOXSTYLE%</code></td>
991 <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
992 <td> Style of text edit box. Set to <code>width: 99%</code> for full window width (default; overwrites the EDITBOXWIDTH setting), or <code>width: auto</code> to disable. Value is: <b><code>%EDITBOXSTYLE%</code></b></td>
995 <td><code>%FINALPREFERENCES%</code></td>
996 <td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
997 <td> List of preferences that are not allowed to be overridden by next level preferences</td>
1000 <td><code>%HTTP_EQUIV_ON_EDIT%</code></td>
1001 <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
1002 <td> http-equiv meta tags for edit script. </td>
1005 <td><code>%HTTP_EQUIV_ON_PREVIEW%</code></td>
1006 <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
1007 <td> http-equiv meta tags for preview script. </td>
1010 <td><code>%HTTP_EQUIV_ON_VIEW%</code></td>
1011 <td><strong><em>SL</em></strong></td>
1012 <td> http-equiv meta tags for view, rdiff, attach, search* scripts. </td>
1015 <td><code>%NEWTOPICBGCOLOR%</code></td>
1016 <td><strong><em>SL</em></strong> , <em>UL</em></td>
1017 <td> Background color of non existing topic. ( <strong><em>UL</em></strong> needs authentication for topic views ) </td>
1020 <td><code>%NEWTOPICFONTCOLOR%</code></td>
1021 <td><strong><em>SL</em></strong> , <em>UL</em></td>
1022 <td> Font color of non existing topic. ( <strong><em>UL</em></strong> needs authentication for topic views ) </td>
1025 <td><code>%NOSEARCHALL%</code></td>
1026 <td><strong><em>WL</em></strong></td>
1027 <td> Exclude web from a <code>web="all"</code> search (set variable to <code>on</code> for hidden webs) </td>
1030 <td><code>%RELEASEEDITLOCKCHECKBOX%</code></td>
1031 <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
1032 <td> Default state of the "Release edit lock" ([[Main/UnlockTopic]]) check box in preview. Checkbox is initially checked if <code>Set RELEASEEDITLOCKCHECKBOX = checked="checked"</code>, or unchecked if empty. If checked, make sure to click on <u>Edit</u> to do more changes; do <strong>not</strong> go back in your browser to the edit page, or you risk that someone else will edit the topic at the same time! Value is: <b><code>%RELEASEEDITLOCKCHECKBOX%</code></b></td>
1035 <td><code>%WEBBGCOLOR%</code></td>
1036 <td><strong><em>WL</em></strong></td>
1037 <td> Background color of web </td>
1040 <td><code>%WEBCOPYRIGHT%</code></td>
1041 <td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
1042 <td> Copyright notice (bottom right corner of topics) </td>
1045 <td><code>%WEBTOPICLIST%</code></td>
1046 <td><strong><em>WL</em></strong></td>
1047 <td> Common links of web (second line of topics) </td>
1050 <td><code>%WIKIWEBLIST%</code></td>
1051 <td><strong><em>SL</em></strong></td>
1052 <td> List of %WIKITOOLNAME% webs (in upper right corner of topics) </td>
1055 <td><code>%WIKIWEBMASTER%</code></td>
1056 <td><strong><em>SL</em></strong></td>
1057 <td> Webmaster email address (sender of email notifications) , is <b></b></td>
1061 **_Note:_** There are some more useful variables defined in the [[TWikiPreferences]] like `%BR%` for line break, colors like `%RED%` for colored text and small icons like `%H%` for a %H% Help icon.
1063 <a name="SettingPrefs"></a>
1065 ## <a name="Setting Preferences"></a> Setting Preferences
1067 - The syntax for Preferences Variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets): <br />[multiple of 3 spaces] \* [space] Set [space] VARIABLENAME [space] = [value]<br />**_Examples:_**
1068 - <code>**Set VARIABLENAME = value**</code>
1069 - <code>**Set VARIABLENAME = value**</code>
1071 ## <a name="Creating Custom Variables"></a> Creating Custom Variables
1073 - You can add your own Preference Variables for us across an entire site or a single web, using the standard [[Preferences syntax|Main/WebHome#SettingPrefs]]. Whatever you include in your Variable will be expanded on display, exactly as if it had been entered directly. You can place formatted text, page links, image paths.
1075 > **Example: Create a custom logo variable the %WEB% web**
1079 > - To place a logo anywhere in a web by typing <code>**%MYLOGO%**</code>, define the Variable on the web's [[WebPreferences]] page, and upload a logo file, ex: `mylogo.gif`. You can upload by [[attaching the file|Main/FileAttachment]] to [[WebPreferences]], or, to avoid clutter, to any other topic in the same web, ex: `LogoTopic`:
1080 > - <code>**Set MYLOGO = %PUBURL%/TWiki/LogoTopic/mylogo.gif**</code>
1082 -- TWiki:Main.PeterThoeny - 09 May 2004 %BR% -- TWiki:Main.MikeMannix - 12 May 2002