Tags:
create new tag
, view all tags

Question

Simple question: How do i set the WebTopBar so the search defaults to all webs? Peter said, "Search all webs: Add a web="all,-Trash" to the search form." so i changed it to

   * <form name="quickSearchForm" action="%SCRIPTURLPATH{view}%/%INCLUDINGWEB%/WebSearch">%IF{" '%URLPARAM{"search" encode="entity" scope="topic"}%' = '' " then="<input type=\"text\" class=\"twikiInputField patternFormFieldDefaultColor\" name=\"search\" value=\"%MAKETEXT{"Search"}%\" size=\"14\" onfocus=\"clearDefaultandCSS(this);\" onblur=\"setDefaultText(this);\" />" else="<input type=\"text\" class=\"twikiInputField\" name=\"search\" value=\"%URLPARAM{ "search" encode="entity" scope="topic" web="all,-Trash"}%\" size=\"14\" />"}%</form>
But that didn't work. what am I doing wrong?

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: n/a
Web server: n/a
Perl version: n/a
Client OS: n/a
Web Browser: n/a
Categories: Forms

-- GrazianoMisuraca - 25 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.

Put the parameters in hidden formfields:

<form name="quickSearchForm" action="%SCRIPTURLPATH{view}%/%INCLUDINGWEB%/WebSearch">%IF{" '%URLPARAM{"search" encode="entity"}%' = '' " then="<input type=\"text\" class=\"twikiInputField patternFormFieldDefaultColor\" name=\"search\" value=\"%MAKETEXT{"Search"}%\" size=\"14\" onfocus=\"clearDefaultandCSS(this);\" onblur=\"setDefaultText(this);\" />" else="<input type=\"text\" class=\"twikiInputField\" name=\"search\" value=\"%URLPARAM{ "search" encode="entity" }%\" size=\"14\" />"}%<input type="hidden" name="scope" value="all" /><input type="hidden" name="web" value="all" /></form>

-- ArthurClemens - 25 May 2007

Worked, changed it so it's all,-Trash though.

-- GrazianoMisuraca - 28 May 2007

See also HowToChangeSearchBoxScope, SearchInWebTopBar.

-- PeterThoeny - 01 Jun 2007

 
Change status to:
Topic revision: r4 - 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.