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

Roman romat2 at gmail.com
Tue Oct 3 07:57:39 CDT 2006


> 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.

Caveman and Pico,
thank you for ideas. I found a solution with the help of
ConditionalExtension recipe. I defined this template:

[[#test]]
(:if ( ge {{=$FullName}$:State} CA ) && ( lt {{=$FullName}$:State} TX ) :)
* {{=$FullName}$:State}
(:ifend:)
[[#testend]]

and then used it this way:

(:pagelist order=$:State fmt=#test:)

Disadvantage of this method is that I have to define pagelist template
for each needed range. But it helps me to remove the only barrier of
massive utilization of page text variables on my site.

Roman




More information about the pmwiki-users mailing list