[pmwiki-users] pmwiki-2.2.0-beta9 release (bugfix, pagevar filters in pagelists)
The Editor
editor at fast.st
Tue Oct 3 06:58:06 CDT 2006
On 10/3/06, Roman <romat2 at gmail.com> wrote:
> > 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 :)
>
> Could I have a modest wish? I was playing with new features and tried
> to utilize page text variables. It would be very helpful if pagelist
> supported something like this:
>
> (:pagelist $:State=#CA#TX order=$:State:)
>
> I borrowed this syntax from (:include:) directive and it would have
> basically similar meaning. It would start listing pages when $:State
> matches 'CA' value and stop listing when $:State matches 'TX' value.
> Some other modification as in (:include:) could work, too, e.g.
>
> (:pagelist $:State=#CA# order=$:State:)
> (:pagelist $:State=##TX order=$:State:)
>
> Is something like this feasible?
>
> Roman
Haven't tried it, but it seems you could use the new $$var's that you
pass into the pagelist template, combined with some kind of
conditional in the pagelist to do this. That is, something like:
(:pagelist $:State order=$:State begin=CA end=TX:)
And then in pagelist template something like:
if item between $$begin and $$end, show in list
Sorry about not showing the template code, but don't know how to do a
condition alphabetically. Maybe someone else could come up with the
actual template. Hope this helps though.
Cheers,
Caveman
More information about the pmwiki-users
mailing list