[pmwiki-users] Conditional Pagelist

Petko Yotov 5ko at 5ko.fr
Thu May 14 11:15:01 PDT 2020


On 14/05/2020 15:39, david at ellendee.co.uk wrote:
> But is it possible to have conditions in pagelist such as (:pagelist
> $:PTV1="XXX" or $PTV2="xxx":)

I just tried in the sandbox:

   (:pagelist group=Cookbook $:Summary=*photo*,*video*:)

It works, and lists all pages from the cookbook where the Summary: line 
contains either "photo" or "video" (or both) case insensitive.


This lists all recipes that are maintained by me:

   (:pagelist group=Cookbook $:Maintainer=*Petko*:)


Note, at first I made a typo and wrote $:Mainrainer which returned 
nothing.

Asterisk * means any character(s) or no character; question mark ? means 
at least one character; comma apparently separates different patterns 
among which at least one needs to match, like for the name= and group= 
arguments.

If you need something specific that doesn't work, feel free to create a 
few pages at pmwiki.org/wiki/Test for review.

Petko




More information about the pmwiki-users mailing list