We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Support Web>SearchAllWebsTopBar (01 Jun 2007, PeterThoeny)
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 - 01 Jun 2007 - 17:37:35 - PeterThoeny
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback