Revert
[openafs-wiki.git] / TWiki / VarTOPICLIST.mdwn
1 <a name="VarTOPICLIST"></a>
2
3 ### <a name="TOPICLIST{&quot;format&quot;} -- topic ind"></a> TOPICLIST\{"format"\} -- topic index of a web
4
5 - List of all topics in a web. The "format" defines the format of one topic item. It may include variables: The `$topic` variable gets expanded to the topic name, `$marker` to `marker` parameter where topic matches `selection`, and `$web` to the name of the web, or any of the standard [[FormatTokens]].
6 - Syntax: `%TOPICLIST{"format" ...}%`
7 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
8   <tr>
9     <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
10     <th bgcolor="#99CCCC"><strong> Description: </strong></th>
11     <th bgcolor="#99CCCC"><strong> Default: </strong></th>
12   </tr>
13   <tr>
14     <td><code>"format"</code></td>
15     <td> Format of one line, may include <code>$web</code> (name of web), <code>$topic</code> (name of the topic), <code>$marker</code> (which expands to <code>marker</code> for the item matching <code>selection</code> only) </td>
16     <td><code>"$topic"</code></td>
17   </tr>
18   <tr>
19     <td><code>format="format"</code></td>
20     <td> (Alternative to above) </td>
21     <td><code>"$topic"</code></td>
22   </tr>
23   <tr>
24     <td><code>separator=", "</code></td>
25     <td> line separator </td>
26     <td><code>"$n"</code> (new line) </td>
27   </tr>
28   <tr>
29     <td><code>marker="selected"</code></td>
30     <td> Text for <code>$marker</code> if the item matches <code>selection</code></td>
31     <td><code>"selected"</code></td>
32   </tr>
33   <tr>
34     <td><code>selection="TopicA, TopicB"</code></td>
35     <td> Current value to be selected in list </td>
36     <td><code>(none)</code></td>
37   </tr>
38   <tr>
39     <td><code>web="Name"</code></td>
40     <td> Name of web </td>
41     <td> Current web </td>
42   </tr>
43 </table>
44 - Example: `%TOPICLIST{"   * $web.$topic"}%` creates a bullet list of all topics
45 - Example: `%TOPICLIST{separator=", "}%` creates a comma separated list of all topics
46 - Example: `%TOPICLIST{" <option>$topic</option>"}%` creates an option list (for drop down menus)
47 - Example: `<select>%TOPICLIST{" <option $marker value='$topic'>$topic</option>" separator=" " selection="%TOPIC%"}%</select>` creates an option list of web topics with the current topic selected
48 - Related: [[SEARCH|Main/VarSEARCH]], [[WEBLIST|Main/VarWEBLIST]]