none
[openafs-wiki.git] / TWiki / TWikiVariables.mdwn
index 5a6e4a5..27109e8 100644 (file)
@@ -3,24 +3,30 @@
     <li><a href="#TWiki Variables"> TWiki Variables</a><ul>
         <li><a href="#Predefined Variables"> Predefined Variables</a></li>
         <li><a href="#Preferences Variables"> Preferences Variables</a></li>
-        <li><a href="#Setting Variable Preferences"> Setting Variable Preferences</a></li>
+        <li><a href="#Setting Preferences"> Setting Preferences</a></li>
         <li><a href="#Creating Custom Variables"> Creating Custom Variables</a></li>
       </ul>
     </li>
   </ul>
 </div>
 
-## <a name="TWiki Variables"></a> TWiki Variables
+# <a name="TWiki Variables"></a> TWiki Variables
 
-TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%**</code> that represent stored data. When a topic is rendered for viewing, defined variables replaced by their actual values. TWiki has two types of variable, predefined, and Preference-based, where you can change settings. Through Preference variables, you can even define custom variables. Clearly, they are a power TWiki feature.
+_Special text strings expand on the fly to display user data or system info_
 
-### <a name="Predefined Variables"></a> Predefined Variables
+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.
 
-%WIKITOOLNAME% expands the following variables enclosed in % percent signs:
+## <a name="Predefined Variables"></a> Predefined Variables
 
-<table border="1">
+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>.
+
+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%">
   <tr>
-    <th> Variable: </th>
+    <th width="160"> Variable: </th>
     <th> Expanded to: </th>
   </tr>
   <tr>
@@ -41,7 +47,7 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
   </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>
@@ -56,20 +62,49 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
     <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>%ICON{"type"}%</code></td>
+    <td> Small 16x16 pixel icon of common attachment types, like <img align="top" alt="bmp" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/bmp.gif" width="16" /> <code>bmp</code>, <img align="top" alt="doc" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/doc.gif" width="16" /> <code>doc</code>, <img align="top" alt="gif" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/gif.gif" width="16" /> <code>gif</code>, <img align="top" alt="hlp" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/hlp.gif" width="16" /> <code>hlp</code>, <img align="top" alt="html" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/html.gif" width="16" /> <code>html</code>, <img align="top" alt="mp3" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/mp3.gif" width="16" /> <code>mp3</code>, <img align="top" alt="pdf" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/pdf.gif" width="16" /> <code>pdf</code>, <img align="top" alt="ppt" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/ppt.gif" width="16" /> <code>ppt</code>, <img align="top" alt="txt" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/txt.gif" width="16" /> <code>txt</code>, <img align="top" alt="xls" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/xls.gif" width="16" /> <code>xls</code>, <img align="top" alt="xml" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/xml.gif" width="16" /> <code>xml</code>, <img align="top" alt="zip" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/zip.gif" width="16" /> <code>zip</code>, etc. Specify file type only, file name, or full path name. Example: <code>%ICON{"pdf"}%</code> returns <img align="top" alt="pdf" border="0" height="16" src="http://www.dementia.org/twiki//view/Main/WebHome/pdf.gif" width="16" /></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>
+    <td> Returns the value of a URL parameter. Note that there is a risk that this variable could be misused for cross-scripting. Parameters are name, default and newline: <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>"name"</code></td>
+          <td> The name of a URL parameter </td>
+          <td> required </td>
+        </tr>
+        <tr>
+          <td><code>default="..."</code></td>
+          <td> Default value in case parameter is empty or missing </td>
+          <td> empty string </td>
+        </tr>
+        <tr>
+          <td><code>newline="&lt;br /&gt;"</code></td>
+          <td> Convert newlines to other delimiters </td>
+          <td> no conversion </td>
+        </tr>
+      </table> Example: <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> Name of wiki tool, is <b>%WIKITOOLNAME%</b></td>
+    <td> The name of your TWiki site - <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>
+    <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 is <b>admin</b></td>
+    <td> Your login username - <b>admin</b></td>
   </tr>
   <tr>
     <td><code>%WIKINAME%</code></td>
@@ -77,15 +112,15 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
   </tr>
   <tr>
     <td><code>%WIKIUSERNAME%</code></td>
-    <td> Your %WIKINAME% including the Main web name. Usefull for signatures. Is <b>Main.admin</b></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 Main web containing [[Main/TWikiUsers]], [[Main/OfficeLocations]] and [[Main/TWikiGroups]]. Is <b>Main</b></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 configuration of %WIKITOOLNAME% is <b>TWiki</b></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>
@@ -97,35 +132,39 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
   </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>
+    <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. Is <b>[[Main/WebHome]]</b></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. Is <b>[[Main/WebNotify]]</b></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. Is <b>TWikiUsers</b></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 web preferences topic. Is <b>WebPreferences</b></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. Is <b>WebStatistics</b></td>
+    <td> The web statistics topic <b>WebStatistics</b></td>
   </tr>
   <tr>
     <td><code>%TOPIC%</code></td>
-    <td> The current topic name, is <b>%TOPIC%</b></td>
+    <td> The current topic name - <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>
+    <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>
@@ -167,7 +206,7 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
   </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">
+    <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>
@@ -199,14 +238,15 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
           <td><code>"selected"</code></td>
         </tr>
         <tr>
-          <td><code>selection</code></td>
-          <td> Current value e.g. current for current Web, =section="%WEB%" </td>
+          <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>
+      </table> Examples: <br /><code>%WEBLIST{"   * [[$name.WebHome]]"}%</code> creates a bullet list of all webs. <br /><code>%WEBLIST{"&lt;option $marker value=$qname&gt;$name&lt;/option&gt;" webs="Trash,public" selection="%WEB%" separator=" "}%</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:28</b></td>
+    <td> GM time, is <b>29 Jun 2010 - 15:43</b></td>
   </tr>
   <tr>
     <td><code>%GMTIME{"format"}%</code></td>
@@ -256,15 +296,15 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
           <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:28:11</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:43:44</b></td>
   </tr>
   <tr>
     <td><code>%SERVERTIME%</code></td>
-    <td> Server time, is <b>29 Jun 2010 - 11:28</b></td>
+    <td> Server time, is <b>29 Jun 2010 - 11:43</b></td>
   </tr>
   <tr>
     <td><code>%SERVERTIME{"format"}%</code></td>
-    <td> Formatted server time. <br /> Example: <code>%SERVERTIME{"$hou:$min"}%</code> is <b>11:28</b></td>
+    <td> Formatted server time. <br /> Example: <code>%SERVERTIME{"$hou:$min"}%</code> is <b>11:43</b></td>
   </tr>
   <tr>
     <td><code>%HTTP_HOST%</code></td>
@@ -284,18 +324,41 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
   </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">
+    <td> Server side include to [[Main/IncludeTopicsAndWebPages]]: <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>"SomeTopic"</code></td>
           <td> The name of a topic located in the current web, i.e. <code>%INCLUDE{"WebNotify"}%</code></td>
+          <td>   </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>
+          <td>   </td>
         </tr>
         <tr>
           <td><code>"http://..."</code></td>
           <td> A full qualified URL, i.e. <code>%INCLUDE{"http://twiki.org/"}%</code></td>
+          <td>   </td>
+        </tr>
+        <tr>
+          <td><code>pattern="..."</code></td>
+          <td> A [[Main/RegularExpression]] pattern to include a subset of a topic or page </td>
+          <td> none </td>
+        </tr>
+        <tr>
+          <td><code>rev="1.2"</code></td>
+          <td> Include a previous topic revision; N/A for URLs </td>
+          <td> top revision </td>
+        </tr>
+        <tr>
+          <td><code>warn="off"</code></td>
+          <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>
+          <td><code>%INCLUDE- WARNING%</code> preferences setting </td>
         </tr>
       </table>
     </td>
@@ -314,7 +377,7 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
   </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">
+    <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>
@@ -347,7 +410,7 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
         </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. For regular expressions ";" is 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>
@@ -356,18 +419,28 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
           <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><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 comma, or <code>all</code> webs. [2] </td>
           <td> Current web </td>
         </tr>
         <tr>
+          <td><code>topic="WebPreferences"</code><br /><code>topic="*Bug"</code></td>
+          <td> Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. </td>
+          <td> All topics in a web </td>
+        </tr>
+        <tr>
+          <td><code>excludetopic="Web*"</code><br /><code>excludetopic="WebHome, WebChanges"</code></td>
+          <td> Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. </td>
+          <td> None </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><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>
@@ -377,7 +450,7 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
         </tr>
         <tr>
           <td><code>regex="on"</code></td>
-          <td>[[Main/RegularExpression]] search </td>
+          <td>[[Main/RegularExpression]] search; also enables ";" as <em>and</em></td>
           <td> Literal search </td>
         </tr>
         <tr>
@@ -415,29 +488,76 @@ TWikiVariables are text strings enclosed in percentage signs: <code>**%VARIABLE%
           <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>
+          <td><code>header="..."</code><br /><code>format="..."</code></td>
+          <td> Custom format results: see <strong>[[Main/FormattedSearch]]</strong> for usage, variables &amp; examples </td>
+          <td> Results in table </td>
+        </tr>
+        <tr>
+          <td><code>multiple="on"</code></td>
+          <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>
+          <td> Only one hit per topic </td>
+        </tr>
+        <tr>
+          <td><code>separator=", "</code></td>
+          <td> Line separator between hits </td>
+          <td> Newline <code>"$n"</code></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><br /> %H% If the TWiki:Plugins.TablePlugin is installed, you may set a <code>%TABLE{}%</code> variable just before the <code>%SEARCH{}%</code> to alter the output of a search. Example: <code><b>%TABLE{ tablewidth="90%" }%</b></code></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>
-    <td>
-      <p>
-      </p>
-    </td>
   </tr>
 </table>
 
-[1] **_Note_**: The search form uses identical names for input fields.
+> [1]
+>
+> **_Note_**
+>
+> : The search form uses identical names for input fields.
+>
+> [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]].
 
-[2] **_Note_**: A web can be excluded from a `web="all"` search if you define a `NOSEARCHALL=on` variable in its [[WebPreferences]].
+<a name="PreferencesVariables"></a>
 
-### <a name="Preferences Variables"></a> Preferences Variables
+## <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 border="1">
+<table align="center" border="1" cellpadding="2" cellspacing="0" style="background-color: #f5f5f5" width="90%">
   <tr>
-    <th> Variable: </th>
+    <th width="160"> Variable: </th>
     <th> Level: </th>
     <th> What: </th>
   </tr>
@@ -492,6 +612,11 @@ Additional variables are defined in the preferences ( site-level ( **_SL_** ) in
     <td> Vertical size of edit box, is <b> <code>%EDITBOXHEIGHT%</code> </b></td>
   </tr>
   <tr>
+    <td><code>%EDITBOXSTYLE%</code></td>
+    <td><strong><em>SL</em></strong> , <strong><em>UL</em></strong></td>
+    <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>
+  </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>
@@ -572,14 +697,43 @@ Additional variables are defined in the preferences ( site-level ( **_SL_** ) in
   </tr>
 </table>
 
-### <a name="Setting Variable Preferences"></a> Setting Variable Preferences
+> **_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.
+
+<a name="SettingPrefs"></a>
 
-- 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:_**
+## <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 />[multiple of 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
+## <a name="Creating Custom Variables"></a> Creating Custom Variables
+
+- 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.
 
-- 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.<br />**_Example:_** To place a logo anywhere in a web by typing <code>**%MYLOGO%**</code>, define the variable in the web's [[WebPreferences]] topic, like this (in this case, you also have to upload <code>**logo.gif**</code> to the same directory):
-  - <code>**Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif**</code>
+> **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>
 
--- [[MikeMannix]] - 30 Aug 2001 <br />
+-- [[PeterThoeny]] - 19 Jan 2003 <br /> -- [[MikeMannix]] - 12 May 2002