[pmwiki-users] pmwiki-2.2.0-beta9 release (bugfix, pagevar filters in pagelists)

The Editor editor at fast.st
Mon Oct 2 06:06:24 CDT 2006


On 10/2/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> I've just released pmwiki-2.2.0-beta9, now available at
>     http://www.pmwiki.org/pub/pmwiki/pmwiki-2.2.0-beta9.tgz
>     http://www.pmwiki.org/pub/pmwiki/pmwiki-2.2.0-beta9.zip
>     svn://pmwiki.org/pmwiki/tags/latest
>
> This release fixes a bug with $EnablePageListProtect that would
> allow the names of read-protected pages to appear in pagelists
> (the bug was introduced in 2.2.0-beta3).
>
> This release also allows the results of pagelist output to
> now be filtered by page variables and page text variables.
> For example, to get a list of all pages with the string "apple"
> in the title:
>
>     (:pagelist $Title=*alpha* fmt=#title:)
>
> The matching algorithm uses simple case-insensitive wildcard
> matching, so a list of all pages with titles beginning with "a"
> might look like:
>
>     (:pagelist $Title=a* fmt=#title:)
>
> Page text variables can also be used as filters, so the following
> would get a list of all pages where the $:State page text variable
> is "TX":
>
>     (:pagelist $:State=TX :)
>
> Multiple values can be separated by commas, thus to get all
> pages with "State: CA", "State: TX", or "State: AK" :
>
>     (:pagelist $:State=CA,TX,AK :)
>
> At present there's not a way to exclude certain values; I'll
> probably add this in an upcoming beta release.
>
> The cookbook already has a number of pages that make it easy
> to experiment with this feature -- for example, doing a
> search of "cookbook/ $:Status=*stable*" on pmwiki.org
> returns a list of all of the "stable" cookbook recipes
> (i.e., those that have "stable" somewhere in their "Status:" line).
>
> Comments welcomed as always.
>
> Pm


This feature is wonderful Pm!  Splendid.  Thanks for all your hard
work.  This will be especially useful when you can pass values into
the pagelist template so you could specify which state to check, or
which letter of the alphabet.  This saves you from having to have a
pagelist template for each state or letter.

You mentioned you might try to add this in somewhere in this round of
beta's.  I hope it is an easy capability to add.  Martin's
PagelistExtension recipe already does this, but I haven't checked to
see if it would work yet with the new code.  I'm hoping it will move
into core.

Cheers,
Caveman




More information about the pmwiki-users mailing list