[Pmwiki-users] Group/SearchWiki?
Patrick R. Michaud
pmichaud
Tue Mar 16 09:53:48 CST 2004
On Tue, Mar 16, 2004 at 05:15:21PM +0100, Thomas -Balu- Walter wrote:
> I have another Feature-Request :)
>
> So I request the following:
>
> [[$Search]] should not create a form with an action of Main/SearchWiki,
> but to one of the following pages:
>
> 1. same page if it contains [[$Searchresults]]
> 2. Group/SearchWiki if it exists
> 3. Main/SearchWiki
#1 is fairly difficult, because we don't always have the page text handy
to find out if the page contains [[$SearchResults]]. Also it's not
entirely clear what [[$Search]] in a sidebar would do in this case.
#2 and #3 are reasonable. However, instead of trying to have [[$Search]]
automatically figure out where to go, I've been planning to add a
[[$Search:SearchPage]] markup, where SearchPage (or Group.SearchPage)
indicates where the search should be sent. But I can see how it'd be
nice to have [[$Search]] automatically do the right thing.
Note that #2 and #3 can be achieved via a variety of local customizations.
One of the easiest is simply something like (untested):
$gs = FmtPageName('$Group/SearchWiki',$pagename);
if (PageExists($gs)) XLSDV('en',array('Main/SearchWiki'=>$gs));
which simply uses the i18n translation table to substitute another page
for Main/SearchWiki if that page exists.
Pm
More information about the pmwiki-users
mailing list