[pmwiki-users] Redirect search results to SearchResults page.

Patrick R. Michaud pmichaud at pobox.com
Fri Oct 21 15:53:09 CDT 2005


On Fri, Oct 21, 2005 at 03:44:34PM -0400, Waylan Limberg wrote:
> I've been trying to get my search to work the way I want, and for the
> most part I have. One thing I don't really care for is that the search
> results are displayed with the URL of the page they originated from.
> Seeing every page has a search box, I don't like this. IMO all results
> should come under a single URL, so when I run a search, PmWiki
> redirects to Site.Search (or perhaps $Group.Search - if search is
> restricted to said group) and displays the results there.

This is in fact how PmWiki 2 *used* to do things, but people requested
that it remain in the same page so that any per-group customizations
and skins would remain in effect.

> I considered changing the format of the search form so that it
> submitted to Site.Search, instead of the current page, but wasn't sure
> exactly how to do this. 

Oooooops!  I meant for this to be something that is easy to configure,
but apparently I didn't actually write it that way.  Don't worry,
in 2.1.0 there will be an option to make searches all go to a
standard search page rather than remain in the current page.

> But then I wondered about those groups that
> are set to only search on that group (via groupname.php). How would
> Site.Search now which group its searching in? 

The group to be searched can be passed as a parameter to the
search; indeed, it can be done by specifying the searchbox markup as

   (:searchbox group={$Group}:) 

> As an aside. I also want to not search that one group when in any
> other group, but I can't seem to override the restriction in
> config.php from groupname.php

A groupname.php file is only loaded when viewing a page in that
group; it's not loaded when accessing a page from another group.
However, it can be done using a custom list= option to (:pagelist:),
set list=default to exclude the group, then use a different list=
parameter when searching from the group.

Pm




More information about the pmwiki-users mailing list