[pmwiki-users] Re: Properties, revisited

Patrick R. Michaud pmichaud at pobox.com
Thu Dec 15 07:14:09 CST 2005


On Thu, Dec 15, 2005 at 11:24:29AM +0100, Dominique Faure wrote:
> 2005/12/15, Patrick R. Michaud <pmichaud at pobox.com>:
> > Out of curiosity, what was the original purpose of the
> > Cookbook.Properties recipe -- i.e., what applications was it
> > supposed to enable or what problems would it solve?
> 
> Initially, I wanted to have a PDF generator recipe as the
> Cookbook.PmWiki2PDF does and the properties should have maintained
> page meta-datas like paper format/orientation,...

Ah, this makes sense.  Thanks, that's what I needed to know.

> The 1st step created an extra storage field into page's file to
> contain the var='val' definition as expected, allowing (:pagelist
> ...:) invocations to select it according to property definition.
> But what about the 2nd step?
> A potentially heavy Rewrite-On-Save work would be required to locate
> the (:property ...:) definition miss (!) and remove the page's file
> dedicated field. 

I think that saved properties should be a limited set (controlled
by the admin).  This makes it easy to remove any saved fields
without having to locate property definitions.  But even if we
didn't do this, it's easy to know which properties are defined
in a page and compare that to the set of attributes.

> IMHo, in order to have consistent properties available, a more wide
> scheme is required: adding properties to wiki pages would transform
> them to some kind of database records. This may implies things like:
> 
> */ A Group.Properties page to populate/overload the $SavedProperties
> array definition.

This could be dangerous -- we wouldn't want to inadvertently allow
an author to be able to override the "text" or "passwdattr" page
attributes.

> */ The Site.EditForm page should take account of the preceding page to
> provide extra form fields to edit the related properties directly,
> avoiding data duplication we may have when using a markup directive.

I think we'll want to do this in general, if only to have a more
generalized form of the EditTitle recipe.

Pm




More information about the pmwiki-users mailing list