[pmwiki-users] Wikipaths (was: PData support for pagelisting images)

Patrick R. Michaud pmichaud at pobox.com
Thu Sep 7 16:56:17 CDT 2006

On Thu, Sep 07, 2006 at 02:38:09PM -0700, Martin Fick wrote:
> --- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
> With wikipaths ideas in mind, what about:
>   {(function args)Group.PageName$[?:# ...](index)var}
> where (index) could be a future enhancement and
> [?:# ...] means that some of these may repeat and
> have more symbols added to them in the future.

Since it's all pie-in-the-sky at the moment, why not?  As long
as it's parseable.  :-)

> Also, how about using a more tradtional function form
> (is it too hard from a regexp standpoint?):
> >   {(function args)Group.PageName#section$[:?]var}
>     {function(args)Group.PageName#section$[:?]var}

It's not too hard, but I like the {(function)...}
syntax since "{(" is a clear marker that a function is
being applied.  It's also somewhat consistent with (:directive:)
syntax, where the args are inside the parens instead of out.
It also leaves the door slightly open for a way to apply 
functions to non-variables, like:

    {(toupper) This text is converted to all caps}

> Of course, this would be most usefull if there were
> some type of looping construct enabled by this (such 
> as what Pico was alluding to with his pagelist 
> requests from MySql I think).

Yes, and part of my aversion to {PageName#section$:var}
is that I know such a looping construct will be demanded,
and the syntax is going to be a bit odd.  Especially when
people start asking for the ability to loop over multiple
sections in multiple pages.  I suppose this really could be
a form of (:pagelist:), but it would have to return
PageName#section references instead of just page names.


More information about the pmwiki-users mailing list