[pmwiki-users] Custom searchbox (original) (raw)

Pico pmwiki at ben-amotz.com
Wed Oct 18 12:22:04 CDT 2006


Any ideas on how to customize searches to allow the value entered into a searchbox (or a separate input form) to be wrapped in a parameter? A question in PmWiki/Questions is looking for a use-friendly way to limit searches to the text of PageName, without requiring visitors to know about searchbox parameters and wildcards.

Background:

For example, assume that you want to search for pages whose name contains the string "Foo"

Right now, this search can be run by entering the entire parameter into the searchbox, as follows:

Search: [name=Foo]

That same search can also be hardcoded into the searchbox directive using the value parameter, like this:

(:searchbox value="name=Foo":)

Question:

The question for the list is whether the searchbox (or searchresults, or a separate input box) can be customized so that the same search can be triggered by simply entering the search term "Foo." In other words:

Search: [Foo]

Triggers a search that wraps the term "Foo" in the parameter name=Foo and results in the following action:

{$Name}&action=search&q=name%3DFoo

Thanks,

Pico



More information about the pmwiki-users mailing list