</tr>
<tr>
<td><code>%PUBURL%</code></td>
- <td> The public URL of TWiki, is <b>http://www.dementia.org/twiki//view</b></td>
+ <td> The public URL of TWiki, is <b>http://www.dementia.org/twiki//view</b><br /> Example: You can refer to a file attached to another topic as <code><b>%PUBURL%/%WEB%/OtherTopic/image.gif</b></code></td>
</tr>
<tr>
<td><code>%PUBURLPATH%</code></td>
<td> Returns the value of a URL parameter. Ex: <code>%URLPARAM{"skin"}%</code> returns <b>print</b> for a <code>.../view/%WEB%/%TOPIC%?skin=print</code> URL. Is <b></b></td>
</tr>
<tr>
+ <td><code>%URLENCODE{"string"}%</code></td>
+ <td> Encodes a string for use as a URL parameter. Ex: <code>%URLENCODE{"spaced name"}%</code> returns <b>spaced%20name</b></td>
+ </tr>
+ <tr>
<td><code>%WIKITOOLNAME%</code></td>
<td> The name of your TWiki site - <b>%WIKITOOLNAME%</b></td>
</tr>
</tr>
<tr>
<td><code>%GMTIME%</code></td>
- <td> GM time, is <b>29 Jun 2010 - 15:33</b></td>
+ <td> GM time, is <b>29 Jun 2010 - 15:36</b></td>
</tr>
<tr>
<td><code>%GMTIME{"format"}%</code></td>
<td> 2 digit year </td>
<td> 99 </td>
</tr>
- </table> Variables can be shortened to 3 characters. Example: <br /><code>%GMTIME{"$day $month, $year - $hour:$min:$sec"}%</code> is <br /><b>29 Jun, 2010 - 15:33:19</b></td>
+ </table> Variables can be shortened to 3 characters. Example: <br /><code>%GMTIME{"$day $month, $year - $hour:$min:$sec"}%</code> is <br /><b>29 Jun, 2010 - 15:36:17</b></td>
</tr>
<tr>
<td><code>%SERVERTIME%</code></td>
- <td> Server time, is <b>29 Jun 2010 - 11:33</b></td>
+ <td> Server time, is <b>29 Jun 2010 - 11:36</b></td>
</tr>
<tr>
<td><code>%SERVERTIME{"format"}%</code></td>
- <td> Formatted server time. <br /> Example: <code>%SERVERTIME{"$hou:$min"}%</code> is <b>11:33</b></td>
+ <td> Formatted server time. <br /> Example: <code>%SERVERTIME{"$hou:$min"}%</code> is <b>11:36</b></td>
</tr>
<tr>
<td><code>%HTTP_HOST%</code></td>
</tr>
<tr>
<td><code>"Web.Topic"</code></td>
- <td> A topic in another web, i.e. <code>%INCLUDE{"TWiki.TWikiWebsTable"}%</code></td>
+ <td> A topic in another web, i.e. <code>%INCLUDE{"TWiki.SiteMap"}%</code></td>
</tr>
<tr>
<td><code>"http://..."</code></td>
</tr>
<tr>
<td><code>%TOC{"SomeTopic" ...}%</code></td>
- <td> Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in [[Main/WikiSyntax]] (<code>"---++ text"</code>) and HTML (<code>"<h2>text<h2>"</code>) are taken into account. (But not <code>"<H2>text</H2>"</code>, which can be used to exclude a heading from the TOC.) Parameters are topic name, web and depth: <table border="1" cellpadding="0" cellspacing="0">
+ <td> Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in [[Main/WikiSyntax]] (<code>"---++ text"</code>) and HTML (<code>"<h2>text</h2>"</code>) are taken into account. Any heading text after <code>"!!"</code> is excluded from the TOC; for example, write <code>"---+!! text"</code> if you do not want to list a header in the TOC. Parameters are topic name, web and depth: <table border="1" cellpadding="0" cellspacing="0">
<tr>
<th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
<th bgcolor="#99CCCC"><strong> Description: </strong></th>
</tr>
<tr>
<td><code>"text"</code></td>
- <td> Search term. (Is a regular expression or literal, depending on the <code>regex</code> parameter) </td>
+ <td> Search term. (Is a regular expression or literal, depending on the <code>regex</code> parameter) [TWikiAlphaRelease - for regular expressions ";" can be used to mean <em>and</em> e.g. "search;agrep" will find all topic containing search <em>and</em> agrep ] </td>
<td> required </td>
</tr>
<tr>
<td> Topic text (body) </td>
</tr>
<tr>
- <td><code>order="topic"</code><br /><code>order="modified"</code><br /><code>order="editby"</code></td>
- <td> Sort the results of search by the topic names, last modified time, or last editor </td>
+ <td><code>order="topic"</code><br /><code>order="modified"</code><br /><code>order="editby"</code><br /><code>order=<br /> "formfield(name)"</code></td>
+ <td> Sort the results of search by the topic names, last modified time, last editor, or named field of [[Main/TWikiForms]]</td>
<td> Sort by topic name </td>
</tr>
<tr>
</tr>
<tr>
<td><code>title="Title"</code></td>
- <td> Text the is prepended to any search results </td>
+ <td> Text that is prepended to any search results </td>
<td> required </td>
</tr>
</table> Example: <code><b>%METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}%</b></code>, you may want to use this in [[Main/WebTopicViewTemplate]] and [[Main/WebTopicNonWikiTemplate]]<br /><code><b>%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%</b></code></td>
</tr>
</table>
+<a name="SettingPrefs"></a>
+
## <a name="Setting Preferences"></a> Setting Preferences
-- The syntax for Preferences variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets): <br />[3 spaces] \* [space] Set [space] VARIABLENAME [space] = [value]<br />**_Examples:_**
+- The syntax for Preferences Variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets): <br />[3 spaces] \* [space] Set [space] VARIABLENAME [space] = [value]<br />**_Examples:_**
- <code>**Set VARIABLENAME = =value=**</code>
- <code>**Set VARIABLENAME = =value=**</code>
## <a name="Creating Custom Variables"></a> Creating Custom Variables
-- You can add your own preference variables for an entire site, a single web, or a single topic, using the standard syntax. Whatever you include in your variable will be expanded on display, and treated exactly as if it had been written out. So you can place formatted text, page links, image paths.
+- 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.
-> **Example: Create a custom logo variable**
+> **Example: Create a custom logo variable the %WEB% web**
>
> <br />
>
-> - To place a logo anywhere in a web by typing <code>**%MYLOGO%**</code>, simply define the variable on the web's [[WebPreferences]] page. You also have to upload `logo.gif` - this can be done by [[attaching a file|Main/FileAttachment]] to `LogoTopic` (any topic name you choose):
-> - <code>**Set MYLOGO = %PUBURL%/%MAINWEB%/LogoTopic/logo.gif**</code>
+> - 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`:
+> - <code>**Set MYLOGO = %PUBURL%/TWiki/LogoTopic/mylogo.gif**</code>
--- [[PeterThoeny]] - 13 Sep 2001 <br /> -- [[MikeMannix]] - 23 Jan 2002
+-- [[PeterThoeny]] - 13 Sep 2001 <br /> -- [[MikeMannix]] - 12 May 2002