[pmwiki-users] pagelistcomma's

Patrick R. Michaud pmichaud at pobox.com
Thu Dec 21 08:16:19 CST 2006


On Thu, Dec 21, 2006 at 12:38:03PM +0100, bram brambring wrote:
> Searching for some functionality I found that having a page with a pagevar like
> 
> :Tags:Foo,Bar
> 
> I'm not able to list this page using pagelist:
> 
> (:pagelist $:Tags=Foo,Bar:)
> 
> The comma seperates the string (I tried quoting).

Yes, at present there's not a way to filter on commas.
Fixing this will likely require a significant update to
ParseArgs.

If you choose a different separator character, such as space,
hyphen, or semicolon, then it should work properly.

One can also take advantage of the fact that $:Var= understands
wildcards, so that the following would work, although it
would allow any character between "Foo" and "Bar".

    (:pagelist $:Tags=Foo?Bar:)

Another possibility is to have separate "Foo" and "Bar" 
page text variables instead of a generic "Tags":

    :Foo: yes
    :Bar: yes

    (:pagelist $:Foo=yes $:Bar=yes:)

> What I actually was searching for is to use pagelist  and $:Var to
> find tagged pages ( looks like http://www.pmwiki.org/wiki/PITS/00740)
> 
> So (:pagelist $Tags=Foo:) should return the page-example above.

Actually, this would find only those pages where $:Tags is exactly
"Foo".  Page text variables are treated as full strings, not as
lists of attributes.

Pm




More information about the pmwiki-users mailing list