Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease04x00x02
TWiki plugins: N/A
Server OS: N/A
Web server: N/A
Perl version: N/A
Client OS:  
Web Browser:  
Categories: Search

-- PeterThoeny - 30 Apr 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list 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

 
Topic revision: r1 - 2006-04-30 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.