Question
How can I show a simple search box in a TWiki topic? I found only one way to include the search box which is by using this syntax:
%INCLUDE{"%TWIKIWEB%.WebSearch"}%
Is this the only way to do it? Or there is some other better method that I could use?
(This question was asked via e-mail)
Environment
--
PeterThoeny - 30 Apr 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
The include of the search page results in a relatively large search page. If you just need a short search box you can write this:
<form action="%SCRIPTURLPATH%/search%SCRIPTSUFFIX%/%WEB%/">
<input type="text" name="search" size="30" />
<input type="submit" value="Search" />
</form>
Which results in:
This calls the
search script, where you can see the search result, but where you cannot refine the search.
You can point to the
WebSearch topic instead, so that you can refine the search:
<form name="simplesearch" action="%SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/WebSearch">
<input type="text" name="search" size="30" />
<input type="submit" class="twikiSubmit" value="Search" />
</form>
Which results in:
--
PeterThoeny - 30 Apr 2006