none
[openafs-wiki.git] / TWiki / TWikiVariables.mdwn
index 538e6ef..eeeead8 100644 (file)
@@ -1,11 +1,10 @@
 <div>
   <ul>
     <li><a href="#TWiki Variables"> TWiki Variables</a><ul>
-        <li><a href="#Overview"> Overview</a></li>
         <li><a href="#Predefined Variables"> Predefined Variables</a></li>
         <li><a href="#Preferences Variables"> Preferences Variables</a></li>
         <li><a href="#Setting Preferences"> Setting Preferences</a></li>
-        <li><a href="#Customizing Variables"> Customizing Variables</a></li>
+        <li><a href="#Creating Custom Variables"> Creating Custom Variables</a></li>
       </ul>
     </li>
   </ul>
 
 # <a name="TWiki Variables"></a> TWiki Variables
 
-_Text strings expanded on the fly to display data or system info_
+_Special text strings expand on the fly to display user data or system info_
 
-## <a name="Overview"></a> Overview
-
-TWikiVariables are text strings - `%VARIABLE%` - that expand into content whenever a page is opened. Variables are replaced by their actual values: stored data, or system info (like the date, or the current user). There are predefined variables, and Preference variables that you set. You can also define custom variables, with new names and values.
+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.
 
 ## <a name="Predefined Variables"></a> Predefined Variables
 
-Most predefined variables return values that were either defined when TWiki was installed, or taken from server info (like current username, or date and time). Many of the variables let you control how the formatted results appear.
+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.
+
+- %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>.
 
-%WIKITOOLNAME% expands the following variables (enclosed in <code>**%**</code> percent signs):
+This version of TWiki - TWiki-4.1.2, Sat, 03 Mar 2007, build 13046 - expands the following variables (enclosed in <code>**%**</code> percent signs):
 
-<table align="center" border="1" cellpadding="2" cellspacing="0" style="background-color: #f5f5f5" width="90%"><font size="13px"><font face="sans-serif"><tr>
-        <th width="160"> Variable: </th>
-        <th> Expanded to: </th>
-      </tr>
-      <tr>
-        <td><code>%WIKIHOMEURL%</code></td>
-        <td> The base script URL of %WIKITOOLNAME%, is the link of the Home icon in the upper left corner, is <b>%WIKIHOMEURL%</b></td>
-      </tr>
-      <tr>
-        <td><code>%SCRIPTURL%</code></td>
-        <td> The script URL of %WIKITOOLNAME%, is <b>http://www.dementia.org/twiki/</b></td>
-      </tr>
-      <tr>
-        <td><code>%SCRIPTURLPATH%</code></td>
-        <td> The path of the script URL of %WIKITOOLNAME%, is <b>http://www.dementia.org/twiki/</b></td>
-      </tr>
-      <tr>
-        <td><code>%SCRIPTSUFFIX%</code></td>
-        <td> The script suffix, ex: <code>.pl</code>, <code>.cgi</code> is <b></b></td>
-      </tr>
-      <tr>
-        <td><code>%PUBURL%</code></td>
-        <td> The public URL of TWiki, is <b>http://www.dementia.org/twiki//view</b></td>
-      </tr>
-      <tr>
-        <td><code>%PUBURLPATH%</code></td>
-        <td> The path of the public URL of %WIKITOOLNAME%, is <b>http://www.dementia.org/twiki//view</b></td>
-      </tr>
-      <tr>
-        <td><code>%ATTACHURL%</code></td>
-        <td> The attachment URL of the current topic, is <b>http://www.dementia.org/twiki//view</b><br /> Example: If you attach a file you can refer to it as <code><b>%ATTACHURL%/image.gif</b></code></td>
-      </tr>
-      <tr>
-        <td><code>%ATTACHURLPATH%</code></td>
-        <td> The path of the attachment URL of the current topic, is <b>http://www.dementia.org/twiki//view</b></td>
-      </tr>
-      <tr>
-        <td><code>%URLPARAM{"name"}%</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>%WIKITOOLNAME%</code></td>
-        <td> Name of wiki tool, is <b>%WIKITOOLNAME%</b></td>
-      </tr>
-      <tr>
-        <td><code>%WIKIVERSION%</code></td>
-        <td> Wiki tool version is <b>TWiki-4.1.2, Sat, 03 Mar 2007, build 13046</b></td>
-      </tr>
-      <tr>
-        <td><code>%USERNAME%</code></td>
-        <td> Your login username is <b>admin</b></td>
-      </tr>
-      <tr>
-        <td><code>%WIKINAME%</code></td>
-        <td> Your Wiki username. Same as %USERNAME% if not defined in the [[Main/TWikiUsers]] topic. Is <b>admin</b></td>
-      </tr>
-      <tr>
-        <td><code>%WIKIUSERNAME%</code></td>
-        <td> Your %WIKINAME% including the Main web name. Usefull for signatures. Is <b>Main.admin</b></td>
-      </tr>
-      <tr>
-        <td><code>%MAINWEB%</code></td>
-        <td> The Main web containing [[Main/TWikiUsers]], [[Main/OfficeLocations]] and [[Main/TWikiGroups]]. Is <b>Main</b></td>
-      </tr>
-      <tr>
-        <td><code>%TWIKIWEB%</code></td>
-        <td> The web containing all documentation and configuration of %WIKITOOLNAME% is <b>TWiki</b></td>
-      </tr>
-      <tr>
-        <td><code>%WEB%</code></td>
-        <td> The current web is <b>%WEB%</b></td>
-      </tr>
-      <tr>
-        <td><code>%BASEWEB%</code></td>
-        <td> The web name where the includes started, e.g. the web of the first topic of nested includes. Same as <code>%WEB%</code> in case there is no include. </td>
-      </tr>
-      <tr>
-        <td><code>%INCLUDINGWEB%</code></td>
-        <td> The web name of the topic that includes the current topic. Same as <code>%WEB%</code> in case there is no include. </td>
-      </tr>
-      <tr>
-        <td><code>%HOMETOPIC%</code></td>
-        <td> The home topic in each web. Is <b>[[Main/WebHome]]</b></td>
-      </tr>
-      <tr>
-        <td><code>%NOTIFYTOPIC%</code></td>
-        <td> The notify topic in each web. Is <b>[[Main/WebNotify]]</b></td>
-      </tr>
-      <tr>
-        <td><code>%WIKIUSERSTOPIC%</code></td>
-        <td> The index topic of all registered users. Is <b>TWikiUsers</b></td>
-      </tr>
-      <tr>
-        <td><code>%WIKIPREFSTOPIC%</code></td>
-        <td> The web preferences topic. Is <b>TWikiPreferences</b></td>
-      </tr>
-      <tr>
-        <td><code>%WEBPREFSTOPIC%</code></td>
-        <td> The web preferences topic. Is <b>WebPreferences</b></td>
-      </tr>
-      <tr>
-        <td><code>%STATISTICSTOPIC%</code></td>
-        <td> The web statistics topic. Is <b>WebStatistics</b></td>
-      </tr>
-      <tr>
-        <td><code>%TOPIC%</code></td>
-        <td> The current topic name, is <b>%TOPIC%</b></td>
-      </tr>
-      <tr>
-        <td><code>%BASETOPIC%</code></td>
-        <td> The name of the topic where the includes started, e.g. the first topic of nested includes. Same as <code>%TOPIC%</code> in case there is no include. </td>
-      </tr>
-      <tr>
-        <td><code>%INCLUDINGTOPIC%</code></td>
-        <td> The name of the topic that includes the current topic. Same as <code>%TOPIC%</code> in case there is no include. </td>
-      </tr>
-      <tr>
-        <td><code>%SPACEDTOPIC%</code></td>
-        <td> The current topic name with added spaces, for regular expression search of Ref-By, is <b></b></td>
-      </tr>
-      <tr>
-        <td><code>%TOPICLIST{"format"}%</code></td>
-        <td> Topic index of a web. The "format" defines the format of one topic item. It may include variables: The <code>$name</code> variable gets expanded to the topic name; the <code>$web</code> variable gets expanded to the name of the web. Parameters are format, separator and web: <table border="1" cellpadding="0" cellspacing="0">
-            <tr>
-              <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Description: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Default: </strong></th>
-            </tr>
-            <tr>
-              <td><code>"format"</code></td>
-              <td> Format of one line, may include <code>$name</code> and <code>$web</code> variables </td>
-              <td><code>"$name"</code></td>
-            </tr>
-            <tr>
-              <td><code>format="format"</code></td>
-              <td> (Alternative to above) </td>
-              <td><code>"$name"</code></td>
-            </tr>
-            <tr>
-              <td><code>separator=", "</code></td>
-              <td> line separator </td>
-              <td><code>"\n"</code> (new line) </td>
-            </tr>
-            <tr>
-              <td><code>web="Name"</code></td>
-              <td> Name of web </td>
-              <td> Current web </td>
-            </tr>
-          </table> Examples: <br /><code>%TOPICLIST{"   * $web.$name"}%</code> creates a bullet list of all topics. <br /><code>%TOPICLIST{separator=", "}%</code> creates a comma separated list of all topics. <br /><code>%TOPICLIST{" &lt;option&gt;$name&lt;/option&gt;"}%</code> creates an option list (for drop down menus). </td>
-      </tr>
-      <tr>
-        <td><code>%WEBLIST{"format"}%</code></td>
-        <td> Web index, e.g. list of all webs. Hidden webs are excluded, e.g. webs with a <code>NOSEARCHALL=on</code> preference variable. The <code>"format"</code> defines the format of one web item. The <code>$name</code> variable gets expanded to the name of the web, <code>$qname</code> gets expanded to double quoted name, <code>$marker</code> to <code>marker</code> where web matches <code>selection</code>. Parameters are format, separator and web: <table border="1" cellpadding="0" cellspacing="0">
-            <tr>
-              <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Description: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Default: </strong></th>
-            </tr>
-            <tr>
-              <td><code>"format"</code></td>
-              <td> Format of one line, may include <code>$name</code> variable </td>
-              <td><code>"$name"</code></td>
-            </tr>
-            <tr>
-              <td><code>format="format"</code></td>
-              <td> (Alternative to above) </td>
-              <td><code>"$name"</code></td>
-            </tr>
-            <tr>
-              <td><code>separator=", "</code></td>
-              <td> line separator </td>
-              <td><code>"\n"</code> (new line) </td>
-            </tr>
-            <tr>
-              <td><code>webs="public"</code></td>
-              <td> comma sep list of Web, public expands to all non-hidden </td>
-              <td><code>"public"</code></td>
-            </tr>
-            <tr>
-              <td><code>marker="selected"</code></td>
-              <td> Text for <code>$marker</code> where item matches <code>selection</code>, otherwise equals <code>""</code></td>
-              <td><code>"selected"</code></td>
-            </tr>
-            <tr>
-              <td><code>selection="%WEB%"</code></td>
-              <td> Current value to be selected in list </td>
-              <td><code>section="%WEB%"</code></td>
-            </tr>
-          </table> Examples: <br /><code>%WEBLIST{"   * [[$name.WebHome]]"}%</code> creates a bullet list of all webs. <br /><code>%WEBLIST{"<select><option $marker="$marker" value="$qname">$name</option>" webs="Trash,public" selection="%WEB%" separator=" "}%</select></code> Dropdown of all public Webs + Trash Web, current Web highlighted. </td>
-      </tr>
-      <tr>
-        <td><code>%GMTIME%</code></td>
-        <td> GM time, is <b>29 Jun 2010 - 15:31</b></td>
-      </tr>
-      <tr>
-        <td><code>%GMTIME{"format"}%</code></td>
-        <td> Formatted GM time based on time variables. <table border="1" cellpadding="0" cellspacing="0">
-            <tr>
-              <th bgcolor="#99CCCC"><strong> Variable: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Unit: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Example </strong></th>
-            </tr>
-            <tr>
-              <td> $seconds </td>
-              <td> seconds </td>
-              <td> 59 </td>
-            </tr>
-            <tr>
-              <td> $minutes </td>
-              <td> minutes </td>
-              <td> 59 </td>
-            </tr>
-            <tr>
-              <td> $hours </td>
-              <td> hours </td>
-              <td> 23 </td>
-            </tr>
-            <tr>
-              <td> $day </td>
-              <td> day of month </td>
-              <td> 31 </td>
-            </tr>
-            <tr>
-              <td> $month </td>
-              <td> month in ISO format </td>
-              <td> Dec </td>
-            </tr>
-            <tr>
-              <td> $mo </td>
-              <td> 2 digit month </td>
-              <td> 12 </td>
-            </tr>
-            <tr>
-              <td> $year </td>
-              <td> 4 digit year </td>
-              <td> 1999 </td>
-            </tr>
-            <tr>
-              <td> $ye </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:31:41</b></td>
-      </tr>
-      <tr>
-        <td><code>%SERVERTIME%</code></td>
-        <td> Server time, is <b>29 Jun 2010 - 11:31</b></td>
-      </tr>
-      <tr>
-        <td><code>%SERVERTIME{"format"}%</code></td>
-        <td> Formatted server time. <br /> Example: <code>%SERVERTIME{"$hou:$min"}%</code> is <b>11:31</b></td>
-      </tr>
-      <tr>
-        <td><code>%HTTP_HOST%</code></td>
-        <td> HTTP_HOST environment variable, is <b></b></td>
-      </tr>
-      <tr>
-        <td><code>%REMOTE_ADDR%</code></td>
-        <td> REMOTE_ADDR environment variable, is <b></b></td>
-      </tr>
-      <tr>
-        <td><code>%REMOTE_PORT%</code></td>
-        <td> REMOTE_PORT environment variable, is <b></b></td>
-      </tr>
-      <tr>
-        <td><code>%REMOTE_USER%</code></td>
-        <td> REMOTE_USER environment variable, is <b></b></td>
-      </tr>
-      <tr>
-        <td><code>%INCLUDE{"page" ...}%</code></td>
-        <td> Server side include to [[Main/IncludeTopicsAndWebPages]]. Parameters are page name, and an optional <code>pattern="(reg-exp)"</code>. The page name is: <table border="1" cellpadding="0" cellspacing="0">
-            <tr>
-              <td><code>"SomeTopic"</code></td>
-              <td> The name of a topic located in the current web, i.e. <code>%INCLUDE{"WebNotify"}%</code></td>
-            </tr>
-            <tr>
-              <td><code>"Web.Topic"</code></td>
-              <td> A topic in another web, i.e. <code>%INCLUDE{"TWiki.TWikiWebsTable"}%</code></td>
-            </tr>
-            <tr>
-              <td><code>"http://..."</code></td>
-              <td> A full qualified URL, i.e. <code>%INCLUDE{"http://twiki.org/"}%</code></td>
-            </tr>
-          </table>
-        </td>
-      </tr>
-      <tr>
-        <td><code>%STARTINCLUDE%</code></td>
-        <td> If present in included topic, start to include text from this location up to the end, or up to the location of the <code>%STOPINCLUDE%</code> variable. A normal view of the topic shows everyting exept the <code>%STARTINCLUDE%</code> variable itself. </td>
-      </tr>
-      <tr>
-        <td><code>%STOPINCLUDE%</code></td>
-        <td> 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 <code>%STOPINCLUDE%</code> variable itself. </td>
-      </tr>
-      <tr>
-        <td><code>%TOC%</code></td>
-        <td> Table of Contents of current topic. </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>"&lt;h2&gt;text&lt;h2&gt;"</code>) are taken into account. (But not <code>"&lt;H2&gt;text&lt;/H2&gt;"</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">
-            <tr>
-              <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Description: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Default: </strong></th>
-            </tr>
-            <tr>
-              <td><code>"TopicName"</code></td>
-              <td> topic name </td>
-              <td> Current topic </td>
-            </tr>
-            <tr>
-              <td><code>web="Name"</code></td>
-              <td> Name of web </td>
-              <td> Current web </td>
-            </tr>
-            <tr>
-              <td><code>depth="2"</code></td>
-              <td> Limit depth of headings shown in TOC </td>
-              <td> 6 </td>
-            </tr>
-          </table> Examples: <code><b>%TOC{depth="2"}%</b></code>, <code><b>%TOC{"TWikiDocumentation" web="TWiki"}%</b></code></td>
-      </tr>
-      <tr>
-        <td><code>%SEARCH{"text" ...}%</code></td>
-        <td> Inline search, shows a search result embedded in a topic. Parameters are the search term, web, scope, order and many more: [1] <table border="1" cellpadding="0" cellspacing="0">
-            <tr>
-              <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Description: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Default: </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> required </td>
-            </tr>
-            <tr>
-              <td><code>search="text"</code></td>
-              <td> (Alternative to above) </td>
-              <td> N/A </td>
-            </tr>
-            <tr>
-              <td><code>web="Name"</code><br /><code>web="Main Know"</code><br /><code>web="all"</code></td>
-              <td> Wiki web to search: A web, a list of webs separated by whitespace, or <code>all</code> webs. [2] </td>
-              <td> Current web </td>
-            </tr>
-            <tr>
-              <td><code>scope="topic"</code><br /><code>scope="text"</code></td>
-              <td> Search topic name (title) or in the text (body) of the topic </td>
-              <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> Sort by topic name </td>
-            </tr>
-            <tr>
-              <td><code>limit="all"</code><br /><code>limit="16"</code></td>
-              <td> Limit the number of results returned </td>
-              <td> All results </td>
-            </tr>
-            <tr>
-              <td><code>regex="on"</code></td>
-              <td>[[Main/RegularExpression]] search </td>
-              <td> Literal search </td>
-            </tr>
-            <tr>
-              <td><code>reverse="on"</code></td>
-              <td> Reverse the direction of the search </td>
-              <td> Ascending search </td>
-            </tr>
-            <tr>
-              <td><code>casesensitive="on"</code></td>
-              <td> Case sensitive search </td>
-              <td> Ignore case </td>
-            </tr>
-            <tr>
-              <td><code>nosummary="on"</code></td>
-              <td> Show topic title only </td>
-              <td> Show topic summary </td>
-            </tr>
-            <tr>
-              <td><code>bookview="on"</code></td>
-              <td>[[Main/BookView]] search, e.g. show complete topic text </td>
-              <td> Show topic summary </td>
-            </tr>
-            <tr>
-              <td><code>nosearch="on"</code></td>
-              <td> Suppress search string </td>
-              <td> Show search string </td>
-            </tr>
-            <tr>
-              <td><code>noheader="on"</code></td>
-              <td> Suppress search header <br /><span style="background: #FFB0B0"> <strong>Topics: Changed: By:</strong> </span></td>
-              <td> Show search header </td>
-            </tr>
-            <tr>
-              <td><code>nototal="on"</code></td>
-              <td> Do not show number of topics found </td>
-              <td> Show number </td>
-            </tr>
-          </table> Example: <code><b>%SEARCH{"wiki" web="Main" scope="topic"}%</b></code></td>
-      </tr>
-      <tr>
-        <td><code>%SEARCH{... format="..."}%</code></td>
-        <td><strong>Control the formatting of an embedded search.</strong> By default, the search result display format is fixed: a table with rows of topic name and topic summary. Use the <code>format="..."</code> parameter to specify a custom format, typically, a bullet list or table row containing variables <br /> Ex: <code>%SEARCH{ "food" format="| $topic | $summary |" }%</code>) <br /><strong>Two paramters can be used to specify a customized search result:</strong><br /><strong>1.</strong> <code>header="..."</code> parameter <br /> Use the header paramter to specify the header of a search result. It should correspond to the format of the format parameter. This parameter is optional. Ex: <code>header="| *Topic:* | *Summary:* |"</code><br /><strong>2.</strong> <code>format="..."</code> parameter <br /><strong>Use the format paramter to specify the format of one search hit.</strong><br /> Ex: <code>format="| $topic | $summary |"</code><br /><strong>Variables that can be used in the format string:</strong><table border="1" cellpadding="0" cellspacing="0">
-            <tr>
-              <th bgcolor="#99CCCC"><strong> Name: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Expands To: </strong></th>
-            </tr>
-            <tr>
-              <td><code>$web</code></td>
-              <td> Name of the web </td>
-            </tr>
-            <tr>
-              <td><code>$topic</code></td>
-              <td> Topic name </td>
-            </tr>
-            <tr>
-              <td><code>$locked</code></td>
-              <td> LOCKED flag (if any) </td>
-            </tr>
-            <tr>
-              <td><code>$date</code></td>
-              <td> Time stamp of last topic update </td>
-            </tr>
-            <tr>
-              <td><code>$rev</code></td>
-              <td> Number of last topic revision, i.e. <code>1.4</code></td>
-            </tr>
-            <tr>
-              <td><code>$wikiusername</code></td>
-              <td> Wiki user name of last topic update, i.e. <code>Main.JohnSmith</code></td>
-            </tr>
-            <tr>
-              <td><code>$summary</code></td>
-              <td> Topic summary </td>
-            </tr>
-            <tr>
-              <td><code>$formfield(name)</code></td>
-              <td> The field value of a form field, i.e. <code>$formfield([[Main/TopicClassification]])</code> would get expanded to <code>PublicFAQ</code>. This applies only to topics that have a [[TWiki/TWikiForms]]</td>
-            </tr>
-            <tr>
-              <td><code>$pattern(reg-exp)</code></td>
-              <td> A regular expression pattern to extract some text from a topic, i.e. <code>$pattern(.*?\*.*?Email\:\s*([^\n\r]+).*)</code> extracts the email address from a bullet of format <code>* Email: ...</code>. </td>
-            </tr>
-          </table><strong><em>Note:</em></strong> For <code>$pattern(reg-exp)</code>, specify a [[TWiki/RegularExpression]] that scans from start to end and contains the text you want to keep in parenthesis, ex: <code>$pattern(.*?(from here.*?to here).*)</code>. You need to make sure that the integrity of a web page is not compromised, i.e. if you include a table make sure to include everything including the table end tag. <br /><strong>NOTE:</strong> Sorting is nicely covered by the [[TWiki/TablePlugin]]. <br /><strong><em>For how-to tips and tricks, see: [[Main/TWikiVariablesExamples]]</em></strong></td>
-      </tr>
-      <tr>
-        <td><code>%METASEARCH{...}%</code></td>
-        <td> Special search of meta data <table border="1" cellpadding="0" cellspacing="0">
-            <tr>
-              <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Description: </strong></th>
-              <th bgcolor="#99CCCC"><strong> Default: </strong></th>
-            </tr>
-            <tr>
-              <td><code>type="topicmoved"</code></td>
-              <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 searcing for topics that have a specific parent i.e. its children </td>
-              <td> required </td>
-            </tr>
-            <tr>
-              <td><code>web="%WEB%"</code></td>
-              <td> Wiki web to search: A web, a list of webs separated by whitespace, or <code>all</code> webs. </td>
-              <td> required </td>
-            </tr>
-            <tr>
-              <td><code>topic="%TOPIC%"</code></td>
-              <td> The topic the search relates to </td>
-              <td> required </td>
-            </tr>
-            <tr>
-              <td><code>title="Title"</code></td>
-              <td> Text the is pre-pended 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>
-      <tr>
-        <td><code>%VAR{"NAME" web="Web"}%</code></td>
-        <td> Get a preference value from a web other then the current one. Example: To get <code>%WEBBGCOLOR%</code> of the Main web write <code>%VAR{"WEBBGCOLOR" web="Main"}%</code>, is <code><b></b></code></td>
-      </tr></font></font></table>
+<table align="center" border="1" cellpadding="2" cellspacing="0" style="background-color: #f5f5f5" width="90%">
+  <tr>
+    <th width="160"> Variable: </th>
+    <th> Expanded to: </th>
+  </tr>
+  <tr>
+    <td><code>%WIKIHOMEURL%</code></td>
+    <td> The base script URL of %WIKITOOLNAME%, is the link of the Home icon in the upper left corner, is <b>%WIKIHOMEURL%</b></td>
+  </tr>
+  <tr>
+    <td><code>%SCRIPTURL%</code></td>
+    <td> The script URL of %WIKITOOLNAME%, is <b>http://www.dementia.org/twiki/</b></td>
+  </tr>
+  <tr>
+    <td><code>%SCRIPTURLPATH%</code></td>
+    <td> The path of the script URL of %WIKITOOLNAME%, is <b>http://www.dementia.org/twiki/</b></td>
+  </tr>
+  <tr>
+    <td><code>%SCRIPTSUFFIX%</code></td>
+    <td> The script suffix, ex: <code>.pl</code>, <code>.cgi</code> is <b></b></td>
+  </tr>
+  <tr>
+    <td><code>%PUBURL%</code></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> The path of the public URL of %WIKITOOLNAME%, is <b>http://www.dementia.org/twiki//view</b></td>
+  </tr>
+  <tr>
+    <td><code>%ATTACHURL%</code></td>
+    <td> The attachment URL of the current topic, is <b>http://www.dementia.org/twiki//view</b><br /> Example: If you attach a file you can refer to it as <code><b>%ATTACHURL%/image.gif</b></code></td>
+  </tr>
+  <tr>
+    <td><code>%ATTACHURLPATH%</code></td>
+    <td> The path of the attachment URL of the current topic, is <b>http://www.dementia.org/twiki//view</b></td>
+  </tr>
+  <tr>
+    <td><code>%URLPARAM{"name"}%</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>
+    <td><code>%WIKIVERSION%</code></td>
+    <td> Your current TWiki version - <b>TWiki-4.1.2, Sat, 03 Mar 2007, build 13046</b></td>
+  </tr>
+  <tr>
+    <td><code>%USERNAME%</code></td>
+    <td> Your login username - <b>admin</b></td>
+  </tr>
+  <tr>
+    <td><code>%WIKINAME%</code></td>
+    <td> Your Wiki username. Same as %USERNAME% if not defined in the [[Main/TWikiUsers]] topic. Is <b>admin</b></td>
+  </tr>
+  <tr>
+    <td><code>%WIKIUSERNAME%</code></td>
+    <td> Your %WIKINAME% including the Main web name - always use full signatures - <b>Main.admin</b></td>
+  </tr>
+  <tr>
+    <td><code>%MAINWEB%</code></td>
+    <td> The web containing [[Main/TWikiUsers]], [[Main/OfficeLocations]] and [[Main/TWikiGroups]] is <b>Main</b></td>
+  </tr>
+  <tr>
+    <td><code>%TWIKIWEB%</code></td>
+    <td> The web containing all documentation and site-wide preference settings for %WIKITOOLNAME% - <b>TWiki</b></td>
+  </tr>
+  <tr>
+    <td><code>%WEB%</code></td>
+    <td> The current web is <b>%WEB%</b></td>
+  </tr>
+  <tr>
+    <td><code>%BASEWEB%</code></td>
+    <td> The web name where the includes started, e.g. the web of the first topic of nested includes. Same as <code>%WEB%</code> in case there is no include. </td>
+  </tr>
+  <tr>
+    <td><code>%INCLUDINGWEB%</code></td>
+    <td> The web name of the topic that includes the current topic - same as <code>%WEB%</code> if there is no INCLUDE. </td>
+  </tr>
+  <tr>
+    <td><code>%HOMETOPIC%</code></td>
+    <td> The home topic in each web - <b>[[Main/WebHome]]</b></td>
+  </tr>
+  <tr>
+    <td><code>%NOTIFYTOPIC%</code></td>
+    <td> The notify topic in each web - <b>[[Main/WebNotify]]</b></td>
+  </tr>
+  <tr>
+    <td><code>%WIKIUSERSTOPIC%</code></td>
+    <td> The index topic of all registered users - <b>TWikiUsers</b></td>
+  </tr>
+  <tr>
+    <td><code>%WIKIPREFSTOPIC%</code></td>
+    <td> The site-wide preferences topic - <b>TWikiPreferences</b></td>
+  </tr>
+  <tr>
+    <td><code>%WEBPREFSTOPIC%</code></td>
+    <td> The local web preferences topic in each web - <b>WebPreferences</b></td>
+  </tr>
+  <tr>
+    <td><code>%STATISTICSTOPIC%</code></td>
+    <td> The web statistics topic <b>WebStatistics</b></td>
+  </tr>
+  <tr>
+    <td><code>%TOPIC%</code></td>
+    <td> The current topic name - <b>%TOPIC%</b></td>
+  </tr>
+  <tr>
+    <td><code>%BASETOPIC%</code></td>
+    <td> The name of the topic where a single or nested INCLUDE started - same as <code>%TOPIC%</code> if there is no INCLUDE. </td>
+  </tr>
+  <tr>
+    <td><code>%INCLUDINGTOPIC%</code></td>
+    <td> The name of the topic that includes the current topic. Same as <code>%TOPIC%</code> in case there is no include. </td>
+  </tr>
+  <tr>
+    <td><code>%SPACEDTOPIC%</code></td>
+    <td> The current topic name with added spaces, for regular expression search of Ref-By, is <b></b></td>
+  </tr>
+  <tr>
+    <td><code>%TOPICLIST{"format"}%</code></td>
+    <td> Topic index of a web. The "format" defines the format of one topic item. It may include variables: The <code>$name</code> variable gets expanded to the topic name; the <code>$web</code> variable gets expanded to the name of the web. Parameters are format, separator and web: <table border="1" cellpadding="0" cellspacing="0">
+        <tr>
+          <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Description: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Default: </strong></th>
+        </tr>
+        <tr>
+          <td><code>"format"</code></td>
+          <td> Format of one line, may include <code>$name</code> and <code>$web</code> variables </td>
+          <td><code>"$name"</code></td>
+        </tr>
+        <tr>
+          <td><code>format="format"</code></td>
+          <td> (Alternative to above) </td>
+          <td><code>"$name"</code></td>
+        </tr>
+        <tr>
+          <td><code>separator=", "</code></td>
+          <td> line separator </td>
+          <td><code>"\n"</code> (new line) </td>
+        </tr>
+        <tr>
+          <td><code>web="Name"</code></td>
+          <td> Name of web </td>
+          <td> Current web </td>
+        </tr>
+      </table> Examples: <br /><code>%TOPICLIST{"   * $web.$name"}%</code> creates a bullet list of all topics. <br /><code>%TOPICLIST{separator=", "}%</code> creates a comma separated list of all topics. <br /><code>%TOPICLIST{" &lt;option&gt;$name&lt;/option&gt;"}%</code> creates an option list (for drop down menus). </td>
+  </tr>
+  <tr>
+    <td><code>%WEBLIST{"format"}%</code></td>
+    <td> Web index, ex: list of all webs. Hidden webs are excluded, e.g. webs with a <code>NOSEARCHALL=on</code> preference variable. The <code>"format"</code> defines the format of one web item. The <code>$name</code> variable gets expanded to the name of the web, <code>$qname</code> gets expanded to double quoted name, <code>$marker</code> to <code>marker</code> where web matches <code>selection</code>. Parameters are format, separator and web: <table border="1" cellpadding="0" cellspacing="0">
+        <tr>
+          <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Description: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Default: </strong></th>
+        </tr>
+        <tr>
+          <td><code>"format"</code></td>
+          <td> Format of one line, may include <code>$name</code> variable </td>
+          <td><code>"$name"</code></td>
+        </tr>
+        <tr>
+          <td><code>format="format"</code></td>
+          <td> (Alternative to above) </td>
+          <td><code>"$name"</code></td>
+        </tr>
+        <tr>
+          <td><code>separator=", "</code></td>
+          <td> line separator </td>
+          <td><code>"\n"</code> (new line) </td>
+        </tr>
+        <tr>
+          <td><code>webs="public"</code></td>
+          <td> comma sep list of Web, public expands to all non-hidden </td>
+          <td><code>"public"</code></td>
+        </tr>
+        <tr>
+          <td><code>marker="selected"</code></td>
+          <td> Text for <code>$marker</code> where item matches <code>selection</code>, otherwise equals <code>""</code></td>
+          <td><code>"selected"</code></td>
+        </tr>
+        <tr>
+          <td><code>selection="%WEB%"</code></td>
+          <td> Current value to be selected in list </td>
+          <td><code>section="%WEB%"</code></td>
+        </tr>
+      </table> Examples: <br /><code>%WEBLIST{"   * [[$name.WebHome]]"}%</code> creates a bullet list of all webs. <br /><code>%WEBLIST{"<select><option $marker="$marker" value="$qname">$name</option>" webs="Trash,public" selection="%WEB%" separator=" "}%</select></code> Dropdown of all public Webs + Trash Web, current Web highlighted. </td>
+  </tr>
+  <tr>
+    <td><code>%GMTIME%</code></td>
+    <td> GM time, is <b>29 Jun 2010 - 15:36</b></td>
+  </tr>
+  <tr>
+    <td><code>%GMTIME{"format"}%</code></td>
+    <td> Formatted GM time based on time variables. <table border="1" cellpadding="0" cellspacing="0">
+        <tr>
+          <th bgcolor="#99CCCC"><strong> Variable: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Unit: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Example </strong></th>
+        </tr>
+        <tr>
+          <td> $seconds </td>
+          <td> seconds </td>
+          <td> 59 </td>
+        </tr>
+        <tr>
+          <td> $minutes </td>
+          <td> minutes </td>
+          <td> 59 </td>
+        </tr>
+        <tr>
+          <td> $hours </td>
+          <td> hours </td>
+          <td> 23 </td>
+        </tr>
+        <tr>
+          <td> $day </td>
+          <td> day of month </td>
+          <td> 31 </td>
+        </tr>
+        <tr>
+          <td> $month </td>
+          <td> month in ISO format </td>
+          <td> Dec </td>
+        </tr>
+        <tr>
+          <td> $mo </td>
+          <td> 2 digit month </td>
+          <td> 12 </td>
+        </tr>
+        <tr>
+          <td> $year </td>
+          <td> 4 digit year </td>
+          <td> 1999 </td>
+        </tr>
+        <tr>
+          <td> $ye </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:36:17</b></td>
+  </tr>
+  <tr>
+    <td><code>%SERVERTIME%</code></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:36</b></td>
+  </tr>
+  <tr>
+    <td><code>%HTTP_HOST%</code></td>
+    <td> HTTP_HOST environment variable, is <b></b></td>
+  </tr>
+  <tr>
+    <td><code>%REMOTE_ADDR%</code></td>
+    <td> REMOTE_ADDR environment variable, is <b></b></td>
+  </tr>
+  <tr>
+    <td><code>%REMOTE_PORT%</code></td>
+    <td> REMOTE_PORT environment variable, is <b></b></td>
+  </tr>
+  <tr>
+    <td><code>%REMOTE_USER%</code></td>
+    <td> REMOTE_USER environment variable, is <b></b></td>
+  </tr>
+  <tr>
+    <td><code>%INCLUDE{"page" ...}%</code></td>
+    <td> Server side include to [[Main/IncludeTopicsAndWebPages]]. Parameters are page name, and an optional <code>pattern="(reg-exp)"</code>. The page name is: <table border="1" cellpadding="0" cellspacing="0">
+        <tr>
+          <td><code>"SomeTopic"</code></td>
+          <td> The name of a topic located in the current web, i.e. <code>%INCLUDE{"WebNotify"}%</code></td>
+        </tr>
+        <tr>
+          <td><code>"Web.Topic"</code></td>
+          <td> A topic in another web, i.e. <code>%INCLUDE{"TWiki.SiteMap"}%</code></td>
+        </tr>
+        <tr>
+          <td><code>"http://..."</code></td>
+          <td> A full qualified URL, i.e. <code>%INCLUDE{"http://twiki.org/"}%</code></td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+  <tr>
+    <td><code>%STARTINCLUDE%</code></td>
+    <td> If present in included topic, start to include text from this location up to the end, or up to the location of the <code>%STOPINCLUDE%</code> variable. A normal view of the topic shows everyting exept the <code>%STARTINCLUDE%</code> variable itself. </td>
+  </tr>
+  <tr>
+    <td><code>%STOPINCLUDE%</code></td>
+    <td> 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 <code>%STOPINCLUDE%</code> variable itself. </td>
+  </tr>
+  <tr>
+    <td><code>%TOC%</code></td>
+    <td> Table of Contents of current topic. </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>"&lt;h2&gt;text&lt;/h2&gt;"</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>
+          <th bgcolor="#99CCCC"><strong> Default: </strong></th>
+        </tr>
+        <tr>
+          <td><code>"TopicName"</code></td>
+          <td> topic name </td>
+          <td> Current topic </td>
+        </tr>
+        <tr>
+          <td><code>web="Name"</code></td>
+          <td> Name of web </td>
+          <td> Current web </td>
+        </tr>
+        <tr>
+          <td><code>depth="2"</code></td>
+          <td> Limit depth of headings shown in TOC </td>
+          <td> 6 </td>
+        </tr>
+      </table> Examples: <code><b>%TOC{depth="2"}%</b></code>, <code><b>%TOC{"TWikiDocumentation" web="TWiki"}%</b></code></td>
+  </tr>
+  <tr>
+    <td><code>%SEARCH{"text" ...}%</code></td>
+    <td> Inline search, shows a search result embedded in a topic. Parameters are the search term, web, scope, order and many more: [1] <table border="1" cellpadding="0" cellspacing="0">
+        <tr>
+          <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Description: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Default: </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) [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><code>search="text"</code></td>
+          <td> (Alternative to above) </td>
+          <td> N/A </td>
+        </tr>
+        <tr>
+          <td><code>web="Name"</code><br /><code>web="Main Know"</code><br /><code>web="all"</code></td>
+          <td> Wiki web to search: A web, a list of webs separated by whitespace, or <code>all</code> webs. [2] </td>
+          <td> Current web </td>
+        </tr>
+        <tr>
+          <td><code>scope="topic"</code><br /><code>scope="text"</code></td>
+          <td> Search topic name (title) or in the text (body) of the topic </td>
+          <td> Topic text (body) </td>
+        </tr>
+        <tr>
+          <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>
+          <td><code>limit="all"</code><br /><code>limit="16"</code></td>
+          <td> Limit the number of results returned </td>
+          <td> All results </td>
+        </tr>
+        <tr>
+          <td><code>regex="on"</code></td>
+          <td>[[Main/RegularExpression]] search </td>
+          <td> Literal search </td>
+        </tr>
+        <tr>
+          <td><code>reverse="on"</code></td>
+          <td> Reverse the direction of the search </td>
+          <td> Ascending search </td>
+        </tr>
+        <tr>
+          <td><code>casesensitive="on"</code></td>
+          <td> Case sensitive search </td>
+          <td> Ignore case </td>
+        </tr>
+        <tr>
+          <td><code>nosummary="on"</code></td>
+          <td> Show topic title only </td>
+          <td> Show topic summary </td>
+        </tr>
+        <tr>
+          <td><code>bookview="on"</code></td>
+          <td>[[Main/BookView]] search, e.g. show complete topic text </td>
+          <td> Show topic summary </td>
+        </tr>
+        <tr>
+          <td><code>nosearch="on"</code></td>
+          <td> Suppress search string </td>
+          <td> Show search string </td>
+        </tr>
+        <tr>
+          <td><code>noheader="on"</code></td>
+          <td> Suppress search header <br /><span style="background: #FFB0B0"> <strong>Topics: Changed: By:</strong> </span></td>
+          <td> Show search header </td>
+        </tr>
+        <tr>
+          <td><code>nototal="on"</code></td>
+          <td> Do not show number of topics found </td>
+          <td> Show number </td>
+        </tr>
+        <tr>
+          <td><code><b>header="..."</b></code><br /><code><b>format="..."</b></code></td>
+          <td> Custom format results: see <strong>[[Main/FormattedSearch]]</strong> for usage, variables &amp; examples </td>
+          <td> Results in table </td>
+        </tr>
+      </table> Regular example: <code><b>%SEARCH{"wiki" web="Main" scope="topic"}%</b></code><br /> Formatted example: <code><b>%SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"%</b></code> <em>(displays results in a table with header - [[Main/FormattedSearch]])</em></td>
+  </tr>
+  <tr>
+    <td><code>%METASEARCH{...}%</code></td>
+    <td> Special search of meta data <table border="1" cellpadding="0" cellspacing="0">
+        <tr>
+          <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Description: </strong></th>
+          <th bgcolor="#99CCCC"><strong> Default: </strong></th>
+        </tr>
+        <tr>
+          <td><code>type="topicmoved"</code></td>
+          <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>
+          <td> required </td>
+        </tr>
+        <tr>
+          <td><code>web="%WEB%"</code></td>
+          <td> Wiki web to search: A web, a list of webs separated by whitespace, or <code>all</code> webs. </td>
+          <td> required </td>
+        </tr>
+        <tr>
+          <td><code>topic="%TOPIC%"</code></td>
+          <td> The topic the search relates to </td>
+          <td> required </td>
+        </tr>
+        <tr>
+          <td><code>title="Title"</code></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>
+  <tr>
+    <td><code>%VAR{"NAME" web="Web"}%</code></td>
+    <td> Get a preference value from a web other then the current one. Example: To get <code>%WEBBGCOLOR%</code> of the Main web write <code>%VAR{"WEBBGCOLOR" web="Main"}%</code>, is <code><b></b></code></td>
+  </tr>
+</table>
 
 > [1]
 >
@@ -514,154 +479,166 @@ Most predefined variables return values that were either defined when TWiki was
 >
 > : The search form uses identical names for input fields.
 >
-> [2] **_Note_**: A web can be excluded from a `web="all"` search if you define a `NOSEARCHALL=on` variable in its [[WebPreferences]].
+> [2] **_Note_**: A web can be excluded from a <code>**web="all"**</code> search if you define a <code>**NOSEARCHALL=on**</code> variable in its [[WebPreferences]].
 
 ## <a name="Preferences Variables"></a> Preferences Variables
 
 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):
 
-<table align="center" border="1" cellpadding="2" cellspacing="0" style="background-color: #f5f5f5" width="90%"><font size="13px"><font face="sans-serif"><tr>
-        <th width="160"> Variable: </th>
-        <th> Level: </th>
-        <th> What: </th>
-      </tr>
-      <tr>
-        <td><code>%WIKIWEBMASTER%</code></td>
-        <td><strong><em>SL</em></strong></td>
-        <td> Webmaster email address (sender of email notifications) , is <b></b></td>
-      </tr>
-      <tr>
-        <td><code>%WIKIWEBLIST%</code></td>
-        <td><strong><em>SL</em></strong></td>
-        <td> List of %WIKITOOLNAME% webs (in upper right corner of topics) </td>
-      </tr>
-      <tr>
-        <td><code>%WEBTOPICLIST%</code></td>
-        <td><strong><em>WL</em></strong></td>
-        <td> Common links of web (second line of topics) </td>
-      </tr>
-      <tr>
-        <td><code>%WEBCOPYRIGHT%</code></td>
-        <td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
-        <td> Copyright notice (bottom right corner of topics) </td>
-      </tr>
-      <tr>
-        <td><code>%WEBBGCOLOR%</code></td>
-        <td><strong><em>WL</em></strong></td>
-        <td> Background color of web </td>
-      </tr>
-      <tr>
-        <td><code>%NOSEARCHALL%</code></td>
-        <td><strong><em>WL</em></strong></td>
-        <td> Exclude web from a <code>web="all"</code> search (set variable to <code>on</code> for hidden webs) </td>
-      </tr>
-      <tr>
-        <td><code>%NEWTOPICBGCOLOR%</code></td>
-        <td><strong><em>SL</em></strong> , <em>UL</em></td>
-        <td> Background color of non existing topic. ( <strong><em>UL</em></strong> needs authentication for topic views ) </td>
-      </tr>
-      <tr>
-        <td><code>%NEWTOPICFONTCOLOR%</code></td>
-        <td><strong><em>SL</em></strong> , <em>UL</em></td>
-        <td> Font color of non existing topic. ( <strong><em>UL</em></strong> needs authentication for topic views ) </td>
-      </tr>
-      <tr>
-        <td><code>%EDITBOXWIDTH%</code></td>
-        <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
-        <td> Horizontal size of edit box, is <b> <code>%EDITBOXWIDTH%</code> </b></td>
-      </tr>
-      <tr>
-        <td><code>%EDITBOXHEIGHT%</code></td>
-        <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
-        <td> Vertical size of edit box, is <b> <code>%EDITBOXHEIGHT%</code> </b></td>
-      </tr>
-      <tr>
-        <td><code>%RELEASEEDITLOCKCHECKBOX%</code></td>
-        <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
-        <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>
-      </tr>
-      <tr>
-        <td><code>%DONTNOTIFYCHECKBOX%</code></td>
-        <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
-        <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>
-      </tr>
-      <tr>
-        <td><code>%ATTACHLINKBOX%</code></td>
-        <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
-        <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>
-      </tr>
-      <tr>
-        <td><code>%HTTP_EQUIV_ON_VIEW%</code></td>
-        <td><strong><em>SL</em></strong></td>
-        <td> http-equiv meta tags for view, rdiff, attach, search* scripts. </td>
-      </tr>
-      <tr>
-        <td><code>%HTTP_EQUIV_ON_EDIT%</code></td>
-        <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
-        <td> http-equiv meta tags for edit script. </td>
-      </tr>
-      <tr>
-        <td><code>%HTTP_EQUIV_ON_PREVIEW%</code></td>
-        <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
-        <td> http-equiv meta tags for preview script. </td>
-      </tr>
-      <tr>
-        <td><code>%DENYWEBCHANGE%</code></td>
-        <td><strong><em>WL</em></strong></td>
-        <td> List of users and groups who are <strong>not allowed</strong> to change topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
-      </tr>
-      <tr>
-        <td><code>%ALLOWWEBCHANGE%</code></td>
-        <td><strong><em>WL</em></strong></td>
-        <td> List of users and groups who are <strong>allowed</strong> to change topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
-      </tr>
-      <tr>
-        <td><code>%DENYTOPICCHANGE%</code></td>
-        <td><strong><em>(any topic)</em></strong></td>
-        <td> List of users and groups who are <strong>not allowed</strong> to change the current topic. (More in [[Main/TWikiAccessControl]]) </td>
-      </tr>
-      <tr>
-        <td><code>%ALLOWTOPICCHANGE%</code></td>
-        <td><strong><em>(any topic)</em></strong></td>
-        <td> List of users and groups who are <strong>allowed</strong> to change the current topic. (More in [[Main/TWikiAccessControl]]) </td>
-      </tr>
-      <tr>
-        <td><code>%DENYWEBRENAME%</code></td>
-        <td><strong><em>WL</em></strong></td>
-        <td> List of users and groups who are <strong>not allowed</strong> to rename topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
-      </tr>
-      <tr>
-        <td><code>%ALLOWWEBRENAME%</code></td>
-        <td><strong><em>WL</em></strong></td>
-        <td> List of users and groups who are <strong>allowed</strong> to rename topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
-      </tr>
-      <tr>
-        <td><code>%DENYTOPICRENAME%</code></td>
-        <td><strong><em>(any topic)</em></strong></td>
-        <td> List of users and groups who are <strong>not allowed</strong> to rename the current topic. (More in [[Main/TWikiAccessControl]]) </td>
-      </tr>
-      <tr>
-        <td><code>%ALLOWTOPICRENAME%</code></td>
-        <td><strong><em>(any topic)</em></strong></td>
-        <td> List of users and groups who are <strong>allowed</strong> to rename the current topic. (More in [[Main/TWikiAccessControl]]) </td>
-      </tr>
-      <tr>
-        <td>
-          <p>
-          </p>
-        </td>
-        <td><code>%FINALPREFERENCES%</code></td>
-        <td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
-        <td> List of preferences that are not allowed to be overridden by next level preferences</td>
-      </tr></font></font></table>
+<table align="center" border="1" cellpadding="2" cellspacing="0" style="background-color: #f5f5f5" width="90%">
+  <tr>
+    <th width="160"> Variable: </th>
+    <th> Level: </th>
+    <th> What: </th>
+  </tr>
+  <tr>
+    <td><code>%WIKIWEBMASTER%</code></td>
+    <td><strong><em>SL</em></strong></td>
+    <td> Webmaster email address (sender of email notifications) , is <b></b></td>
+  </tr>
+  <tr>
+    <td><code>%WIKIWEBLIST%</code></td>
+    <td><strong><em>SL</em></strong></td>
+    <td> List of %WIKITOOLNAME% webs (in upper right corner of topics) </td>
+  </tr>
+  <tr>
+    <td><code>%WEBTOPICLIST%</code></td>
+    <td><strong><em>WL</em></strong></td>
+    <td> Common links of web (second line of topics) </td>
+  </tr>
+  <tr>
+    <td><code>%WEBCOPYRIGHT%</code></td>
+    <td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
+    <td> Copyright notice (bottom right corner of topics) </td>
+  </tr>
+  <tr>
+    <td><code>%WEBBGCOLOR%</code></td>
+    <td><strong><em>WL</em></strong></td>
+    <td> Background color of web </td>
+  </tr>
+  <tr>
+    <td><code>%NOSEARCHALL%</code></td>
+    <td><strong><em>WL</em></strong></td>
+    <td> Exclude web from a <code>web="all"</code> search (set variable to <code>on</code> for hidden webs) </td>
+  </tr>
+  <tr>
+    <td><code>%NEWTOPICBGCOLOR%</code></td>
+    <td><strong><em>SL</em></strong> , <em>UL</em></td>
+    <td> Background color of non existing topic. ( <strong><em>UL</em></strong> needs authentication for topic views ) </td>
+  </tr>
+  <tr>
+    <td><code>%NEWTOPICFONTCOLOR%</code></td>
+    <td><strong><em>SL</em></strong> , <em>UL</em></td>
+    <td> Font color of non existing topic. ( <strong><em>UL</em></strong> needs authentication for topic views ) </td>
+  </tr>
+  <tr>
+    <td><code>%EDITBOXWIDTH%</code></td>
+    <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
+    <td> Horizontal size of edit box, is <b> <code>%EDITBOXWIDTH%</code> </b></td>
+  </tr>
+  <tr>
+    <td><code>%EDITBOXHEIGHT%</code></td>
+    <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
+    <td> Vertical size of edit box, is <b> <code>%EDITBOXHEIGHT%</code> </b></td>
+  </tr>
+  <tr>
+    <td><code>%RELEASEEDITLOCKCHECKBOX%</code></td>
+    <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
+    <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>
+  </tr>
+  <tr>
+    <td><code>%DONTNOTIFYCHECKBOX%</code></td>
+    <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
+    <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>
+  </tr>
+  <tr>
+    <td><code>%ATTACHLINKBOX%</code></td>
+    <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
+    <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>
+  </tr>
+  <tr>
+    <td><code>%HTTP_EQUIV_ON_VIEW%</code></td>
+    <td><strong><em>SL</em></strong></td>
+    <td> http-equiv meta tags for view, rdiff, attach, search* scripts. </td>
+  </tr>
+  <tr>
+    <td><code>%HTTP_EQUIV_ON_EDIT%</code></td>
+    <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
+    <td> http-equiv meta tags for edit script. </td>
+  </tr>
+  <tr>
+    <td><code>%HTTP_EQUIV_ON_PREVIEW%</code></td>
+    <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
+    <td> http-equiv meta tags for preview script. </td>
+  </tr>
+  <tr>
+    <td><code>%DENYWEBCHANGE%</code></td>
+    <td><strong><em>WL</em></strong></td>
+    <td> List of users and groups who are <strong>not allowed</strong> to change topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
+  </tr>
+  <tr>
+    <td><code>%ALLOWWEBCHANGE%</code></td>
+    <td><strong><em>WL</em></strong></td>
+    <td> List of users and groups who are <strong>allowed</strong> to change topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
+  </tr>
+  <tr>
+    <td><code>%DENYTOPICCHANGE%</code></td>
+    <td><strong><em>(any topic)</em></strong></td>
+    <td> List of users and groups who are <strong>not allowed</strong> to change the current topic. (More in [[Main/TWikiAccessControl]]) </td>
+  </tr>
+  <tr>
+    <td><code>%ALLOWTOPICCHANGE%</code></td>
+    <td><strong><em>(any topic)</em></strong></td>
+    <td> List of users and groups who are <strong>allowed</strong> to change the current topic. (More in [[Main/TWikiAccessControl]]) </td>
+  </tr>
+  <tr>
+    <td><code>%DENYWEBRENAME%</code></td>
+    <td><strong><em>WL</em></strong></td>
+    <td> List of users and groups who are <strong>not allowed</strong> to rename topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
+  </tr>
+  <tr>
+    <td><code>%ALLOWWEBRENAME%</code></td>
+    <td><strong><em>WL</em></strong></td>
+    <td> List of users and groups who are <strong>allowed</strong> to rename topics in the %WIKITOOLNAME% web. (More in [[Main/TWikiAccessControl]]) </td>
+  </tr>
+  <tr>
+    <td><code>%DENYTOPICRENAME%</code></td>
+    <td><strong><em>(any topic)</em></strong></td>
+    <td> List of users and groups who are <strong>not allowed</strong> to rename the current topic. (More in [[Main/TWikiAccessControl]]) </td>
+  </tr>
+  <tr>
+    <td><code>%ALLOWTOPICRENAME%</code></td>
+    <td><strong><em>(any topic)</em></strong></td>
+    <td> List of users and groups who are <strong>allowed</strong> to rename the current topic. (More in [[Main/TWikiAccessControl]]) </td>
+  </tr>
+  <tr>
+    <td>
+      <p>
+      </p>
+    </td>
+    <td><code>%FINALPREFERENCES%</code></td>
+    <td><strong><em>SL</em></strong> , <strong><em>WL</em></strong></td>
+    <td> List of preferences that are not allowed to be overridden by next level preferences</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. In Edit mode, from the start of a new line: <br />[6 spaces] \* [space] Set [space] VARIABLENAME [space] = [value] <br />**_Example:_**
-  - <code>**Set VARIABLENAME = value**</code>
+- 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="Customizing Variables"></a> Customizing Variables
+## <a name="Creating Custom Variables"></a> Creating Custom Variables
 
-**_See:_** [[TWikiVariables Examples|Main/TWikiVariablesExamples]]
+- 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 the %WEB% web**
+>
+> <br />
+>
+> - 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]] - 30 Nov 2001
+-- [[PeterThoeny]] - 13 Sep 2001 <br /> -- [[MikeMannix]] - 12 May 2002