[pmwiki-users] random musings

Patrick R. Michaud pmichaud at pobox.com
Fri Dec 16 10:37:47 CST 2005


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:)  


3. Pagelist refactoring
Pagelist has evolved *very* nicely from where I started over a year
ago, but the code is becoming pretty crufty in the interest of 
preserving backwards compatibility.  It may be time to do a major 
refactoring for pagelist (we are in beta, after all), and provide 
the current pagelist code as an optional module or recipe for 
sites with custom pagelist settings and need time to migrate
those into the new framework.  However, custom FPL formatting 
functions would continue to work in the new version w/o modification 
-- the refactoring would affect only those people who have 
customizations that rely heavily on the existence of current 
variables and their values.

Comments, reactions?

Pm




More information about the pmwiki-users mailing list