http://twiki.org/cgi-bin/view/Codev/GoIsSearch#OneBox
I just created a "onebox" search box. What I did was just four lines of perl code in twiki/bin/search and changing the search box form.
- added a new paramater to searching "dogobox" if it is non-empty, then the normal search cgi will first check to see if there is a pagename which matches the search, and go there. If not, it performs a normal search.
- changed the 'go box' to point at the search cgi, and added the hidden paramater "dogobox"="yes"
- I've attached my modified twiki/bin/search cgi, it's just four lines of code near the bottom, search
my $doGoBox = $query->param( "dogobox" ) || "";
# emulate "go" behavior during a search
if (($doGoBox ne "") && &TWiki::Store::topicExists( $webName, $search ) ) {
TWiki::redirect( $query, &TWiki::getViewUrl( "", $search ) );
}
--
DavidJeske - 07 Jun 2003
Scheduled for Dakar, big usability enhancement. The spec needs to be finalized...
--
PeterThoeny - 04 Aug 2004
Postponed to
EdinburghRelease as Dakar is now "security and perfomance only" changes.
--
MattWilkie - 06 Dec 2004
If the change is as simple as
DavidJeske makes out above, perhaps this should be reconsidered for Dakar?
--
AntonAylward - 28 Jun 2005
sure, i'll be happy to apply any forthcoming patches...
--
WillNorris - 29 Jun 2005
I suggest to defer this to Edinburgh, see reason in
TWiki:Codev.GoIsSearch (my note dated 13 Oct 2005)
--
PTh
that's fine with me... i've attached a patch i worked on for this for completness.
WN
Seeing the discussion on Codev, I have created a temporary solution for the Dakar release, to have both a Go box and a Search box, in the left bar.
TWiki masters can decide to leave one of these out.
SVN 7072.
AC
Undeferred, post Dakar
CC
Aged to death.
Besides I do not even agree. If OFTEN want to search for topics in which a topic name is used. And then I want those in the the search result. Not just jump to this page.
I think we have a pretty fine solution right now.
I dare say No action.
And if someone wants it anyway please raise feature proposal first.
--
TWiki:Main.KennethLavrsen - 02 Aug 2008