[pmwiki-users] Re: Properties, revisited

Dominique Faure dominique.faure at gmail.com
Thu Dec 15 04:24:29 CST 2005


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,...

OT: Following my own Dev. principles leads me to start with this...
#1: The only quantities to handle are 0 or n (with an exception for 1
sometimes).
#2: Always solve first the generic problem.

Looking into saved "properties" a bit further:

Imagine you created a page containing one saved property in the text
via a "regular" (:property var="val":) and saved it [step#1], then
edited it to erase the (:property ...:) markup and saved it again
[step#2].

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. A lighter alternative would be to alter the extra
storage field only when asked to, requiring explicits (:property
-var:) in the page's text...

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.
*/ 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.

Just my 2c,
Dom




More information about the pmwiki-users mailing list