[pmwiki-users] random musings

Martin Fick fick at fgm.com
Fri Dec 16 18:15:32 CST 2005


On Fri, Dec 16, 2005 at 10:37:47AM -0600, Patrick R. Michaud wrote:
> Some random musings and questions to see if anyone has comments,
> ideas, or suggestions...
> 
> 
> 1. Page variables 
> The new {$...} and {pagename$...} syntax works great, and I think 
> it even makes the code more efficient.  It's likely a keeper.
> 
> 
> 2. Wildcards 
> Conditional markup needs a bit of work.  I'd like to work wildcards
> ('*' and '?') into conditionals and pagelists somehow, but I can't 
> seem to come up with the proper names for the options.  Currently 
> we have available
> 
>     (:if group Profiles:)        # page is in Profiles group
>     (:if name HomePage:)         # page is named "HomePage" (in any group)
>     (:if match <pattern>:)       # page's name matches pattern (a regexp)
>     (:pagelist group=Profiles:)  # pages in Profiles group
>     (:pagelist list=normal:)     # pages matching "normal" selection
> 
> One option is to just allow wildcards directly on "group" and "name"
> values in conditionals, so that
> 
>     (:if group PmWiki* :)        # any group begining with "PmWiki"
>     (:pagelist group=PmWiki* :)  # all pages in groups starting with "PmWiki"
>     (:if name A*:)               # any page starting with "A"
> 
> But how to match both group and name simultaneously?  For consistency 
> with other markups, do we just use "fullname"?  (Somehow I think it's
> a big ugly.)
> 
>     (:if fullname PmWiki.A* :)   # pages starting with "A" in the PmWiki group
>     (:pagelist fullname=2005.Blog* :)  # "Blog*" pages in the 2005 group
> 
> Hmm, I guess "fullname" isn't so bad.  Lists of wildcards will also be
> allowed
> 
>     (:pagelist fullname=2005.Blog*,2006.Blog*:)
> 
> as well as negations
> 
>     (:pagelist fullname=-*.HomePage,-*.RecentChanges:)  


All looks pretty neat to me. :)

-Martin




More information about the pmwiki-users mailing list