Tags:
create new tag
, view all tags

Question

How do I change the default scope of the search box in the pattern template to "all" rather than "text"?

I have successfully changed the default on the WebSearch topic, but this does not apply to the Search box.

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Windows XP
Web server: Apache 2.2.4
Perl version: 5.8
Client OS: All
Web Browser: All
Categories: Search

-- RobHill - 10 May 2007

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.

Modify the WebTopBar located in the TWiki web.

-- PeterThoeny - 11 May 2007

Thanks Peter, I thought that was the right place to look, but hadn't had any luck modifiying it. I assumed the scope="topic" bit in the URLPARAM expression was the right bit to change, but having looked at VarURLPARAM I don't really understand what the scope= bit actually does in that expression...

Anyway, in the end I added:

<INPUT TYPE=hidden NAME=scope VALUE="all">
to the form field in WebTopBar and that seems to work as I wanted.

Thanks

-- RobHill - 14 May 2007

Hmm, it should work. There are two forms. Make sure you add this to the search form, not the jump form. And better to use proper XHTML:

<input type="hidden" name="scope" value="all" />

-- PeterThoeny - 15 May 2007

See also SearchAllWebsTopBar, SearchInWebTopBar.

-- PeterThoeny - 01 Jun 2007

 
Change status to:
Topic revision: r5 - 2007-06-01 - 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.