Hi,

> Is there a way, please, of doing something like:
> 
> !!! Table Search
> 
> (:searchbox fmt=Services.Template#tabler3 group=Services 
> name=????-??-??-* count=999 order=$:Sname:)
> 
> (:searchresults:)
> 
> (:if equal "{$SomeVariableorOther}" "SomethingElse" :)
> (:pagelist fmt=Services.Template#tabler3 group=Services 
> name=????-??-??-* count=999 order=$:Sname :)
> (:ifend:)
> 
> Which is to say when the user comes to a page, I'd like them to see the 
> result of the pagelist with a searchbox above it, but if the searchbox 
> is used for a search, then I'd like to display the searchresults and no 
> pagelist?

The answer to this uses Mateusz Czaplinsky's $SearchQuery:

http://www.pmwiki.org/wiki/Cookbook/SearchQueryVariable

giving:

(:searchbox :)
(:if equal "{$SearchQuery}" "" :)
(:pagelist fmt=Services.Searcher#tabler3 group=Services 
name=????-??-??-* count=999 order=$:Sname :)
(:else:)
(:searchresults fmt=Services.Searcher#tabler3 group=Services 
name=????-??-??-* count=999 order=$:Sname :)
(:ifend:)

Cheers

Steve

-- 
Steve Glover: SDSS, EDINA, Causewayside House, 160 Causewayside EH9 1PR
e:[EMAIL PROTECTED] t:0131 650 2908 f:0131 650 3308 m:07961 446 902

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to