[pmwiki-users] PData support for pagelisting images

Stirling Westrup sti at pooq.com
Thu Sep 7 17:58:19 CDT 2006


Patrick R. Michaud wrote:
> On Thu, Sep 07, 2006 at 05:52:54PM +0000, Pico wrote:

>> Might as well mention it here.  Are you considering the possibility that
>> pagelists might (one day) also grab data from other sources, and here I am
>> thinking separate databases and, specifically, mySQL?  
> 
> I'm thinking that page variables could be used to grab data from other 
> sources, but I'm not planning for pagelists to do it.  Pagelists are for
> generating lists of pages -- if we need a list of other things (e.g., records
> in a MySQL table), that really ought to be a different directive.
> 
> However, this doesn't mean that the other directive can't make use of
> page variables, pagelist templates, etc.  :-)

If these theoretical new directives are going to have many (all?) of the
same features as pagelists including the use of templates and such, then
you may want to redefine the pagelist directive as a specialization of a
more general directive. Maybe something such that

  (:pagelist fmt=#myformat group=MyGroup list=normal:)

is interpreted as a short form of saying:

  (:datalist source=PmWiki fmt=#myformat group=MyGroup list=normal:)

and there would be other possible sources such as MySQL, or whatever.
Naturally, one would want a consistent API so that the more enthusiastic
of us could create recipes for new data sources such as LDAP, etc.






More information about the pmwiki-users mailing list