none
[openafs-wiki.git] / TWiki / VarMETASEARCH.mdwn
1 <a name="VarMETASEARCH"></a>
2
3 ### <a name="METASEARCH -- special search of"></a><a name="METASEARCH -- special search of "></a> METASEARCH -- special search of meta data
4
5 - Syntax: `%METASEARCH{...}%`
6 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
7   <tr>
8     <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
9     <th bgcolor="#99CCCC"><strong> Description: </strong></th>
10     <th bgcolor="#99CCCC"><strong> Default: </strong></th>
11   </tr>
12   <tr>
13     <td><code>type="topicmoved"</code></td>
14     <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 <br /><code>"field"</code> if searching for topics that have a particular form field value (use the <code>name</code> and <code>value</code> parameters to specify which field to search) </td>
15     <td> Required </td>
16   </tr>
17   <tr>
18     <td><code>web="%WEB%"</code></td>
19     <td> Wiki web to search: A web, a list of webs separated by whitespace, or <code>all</code> webs. </td>
20     <td> Current web </td>
21   </tr>
22   <tr>
23     <td><code>topic="%TOPIC%"</code></td>
24     <td> The topic the search relates to, for <code>topicmoved</code> and <code>parent</code> searches </td>
25     <td> All topics in a web </td>
26   </tr>
27   <tr>
28     <td><code>name</code></td>
29     <td> form field to search, for <code>field</code> type searches. May be a regular expression (see [[Main/VarSEARCH]]). </td>
30     <td>   </td>
31   </tr>
32   <tr>
33     <td><code>value</code></td>
34     <td> form field value, for <code>field</code> type searches. May be a regular expression (see [[Main/VarSEARCH]]). </td>
35     <td>   </td>
36   </tr>
37   <tr>
38     <td><code>title="Title"</code></td>
39     <td> Text that is prefixed to any search results </td>
40     <td> empty </td>
41   </tr>
42   <tr>
43     <td><code>format="..."</code></td>
44     <td> Custom format results. Supports same format strings as [[Main/VarSEARCH]]. See <strong>[[Main/FormattedSearch]]</strong> for usage, variables &amp; examples </td>
45     <td> Results in table </td>
46   </tr>
47   <tr>
48     <td><code>default="none"</code></td>
49     <td> Default text shown if no search hit </td>
50     <td> Empty </td>
51   </tr>
52 </table>
53 - Example: `%METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}%`
54 - Example: You may want to use this in [[WebTopicViewTemplate]] and [[WebTopicNonWikiTemplate]]:<br />`%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%`
55 - Example: `%METASEARCH{type="field" name="Country" value="China"}%`
56 - Related: [[SEARCH|Main/VarSEARCH]], [[META|Main/VarMETA]]
57 - **_%X% Note:_** METASEARCH is deprecated in favour of the new and much more powerful query type search. See [[SEARCH|Main/VarSEARCH]] and [[QuerySearch]].
58
59 **_Related Topics:_** [[UserDocumentationCategory]]
60
61 **_Note:_** This topic is included by [[TWikiVariables]]
62
63 ----