
| Line: 1 to 1 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
On this page:
| |||||||||||
| Line: 6 to 6 | |||||||||||
| Inline search feature allows flexible formatting of search result | |||||||||||
| Changed: | |||||||||||
| < < | The %SEARCH{...}% variable documented in TWikiVariables has a fixed format for the search result, that is, a table consisting of topic names and topic summaries. Use the format="..." parameter to specify a customized format of the search result. The string of the format parameter is typically a bullet list or table row containing variables (such as %SEARCH{ "food" format="| $topic | $summary |" }%). | ||||||||||
| > > | The %SEARCH{...}% variable documented in TWikiVariables has a fixed format for the search result, that is, a table consisting of topic names and topic summaries. Use the format="..." parameter to specify a customized format of the search result. The string of the format parameter is typically a bullet list or table row containing variables (such as %SEARCH{ "food" format="| $topic | $summary |" }%). | ||||||||||
Syntax | |||||||||||
| Line: 29 to 29 | |||||||||||
| |||||||||||
| Added: | |||||||||||
| > > |
| ||||||||||
| |||||||||||
| Line: 47 to 49 | |||||||||||
| |||||||||||
| Changed: | |||||||||||
| < < |
| ||||||||||
| > > |
| ||||||||||
| |||||||||||
| Deleted: | |||||||||||
| < < | Note: For $pattern(reg-exp), specify a RegularExpression that scans from start to end and contains the text you want to keep in parenthesis, like $pattern(.*?(from here.*?to here).*). You need to make sure that the integrity of a web page is not compromised; for example, if you include a table make sure to include everything including the table end tag. | ||||||||||
Examples | |||||||||||
| Line: 74 to 74 | |||||||||||
Table showing form field values of topics with a form | |||||||||||
| Changed: | |||||||||||
| < < | Write this in the Know web: | ||||||||||
| > > | In a web where there is a form that contains a TopicClassification field, an OperatingSystem field and an OsVersion field we could write: | ||||||||||
| *Topic:* | *OperatingSystem:* | *OsVersion:* | %SEARCH{ "[T]opicClassification.*?value=\"[P]ublicFAQ\"" scope="text" regex="on" nosearch="on" nototal="on" format="| [[$topic]] | $formfield(OperatingSystem) | $formfield(OsVersion) |" }% | |||||||||||
| Changed: | |||||||||||
| < < | To get this: | ||||||||||
| > > | To get this: | ||||||||||
|
| |||||||||||
| Line: 87 to 87 | |||||||||||
| |||||||||||
| Changed: | |||||||||||
| < < |
| ||||||||||
| > > |
| ||||||||||
| Changed: | |||||||||||
| < < |
| ||||||||||
| > > |
| ||||||||||
| |||||||||||
| Line: 130 to 130 | |||||||||||
| Could not perform search. Error was: /bin/grep -F -i -l -H -- %TOKEN|U% %FILES|F% Grep for 'culture' returned error | |||||||||||
| Added: | |||||||||||
| > > | Note: Nested search can be slow, especially if you nest more then 3 times. Nesting is limited to 16 levels. For each new nesting level you need to "escape the escapes", e.g. write $dollarpercntSEARCH{ for level three, $dollardollarpercntSEARCH{ for level four, etc. | ||||||||||
Most recently changed pagesWrite this: | |||||||||||
| Line: 192 to 194 | |||||||||||
| Result: | |||||||||||
| Changed: | |||||||||||
| < < | -- TWiki:Main.PeterThoeny | ||||||||||
| > > | -- TWiki:Main.PeterThoeny | ||||||||||