[pmwiki-users] pagelist filters

Peter Bowers pbowers at pobox.com
Wed Mar 2 18:36:32 CST 2011


On Wed, Mar 2, 2011 at 10:33 AM, Martin Kerz <martinkerz at gmail.com> wrote:
> Has anyone yet built an interface for pagelists which you could use as some kind of filter?
>
> I want something like a form at the top of the page in which you can say something like: I want all pages in the
> wikigroup „Pizza“ that has the PTV „Funghi“ set. Ideally the form would take the predefined PTV values from the
> group itself. When clicking on „Generate Pagelist“, you could see the results.

Here's something that may be along the lines of what you are looking for:

===(snip)===
(:input form {$FullName} method=GET:)
Name: (:input text name:)

ptv: (:input text ptv:)

(:input submit:)
(:input end:)

(:pagelist name="${!name}" $:ptv="${!ptv}":)
===(snip)===

This allows you to put in a value (such as Pizza.*) for the name.  If
you don't put in a value then it ignores this selection criteria.

It also allows you to put in a value for $:ptv (such as funghi) and
similarly selects on that criteria if there is a value or ignores it
if no value.

Getting PTV from a select box is just a different application of the
input forms.  Obviously getting the values to come from a dynamic
query rather than from something hardcoded would have to be done via
PHP behind the scenes -- a lot more work.

I'm using wikish to get the ${!name} and ${!ptv} values from $_REQUEST
-- a more typical application would use the httpvariables recipe.

-Peter



More information about the pmwiki-users mailing list