[pmwiki-users] Properties

Patrick R. Michaud pmichaud at pobox.com
Tue Dec 13 14:33:40 CST 2005


On Tue, Dec 13, 2005 at 09:17:36PM +0100, Sebastian Siedentopf wrote:
> If I correctly understand the implementation, in php the saved  
> properties will be accessed via
> 
>   $page = Readpage(...);
>   $myproperty  = $page['propertyname'];

Yes.  However, note that this doesn't automatically translate
to the {$property propertyname} markup.  Essentialy saved properties
is just a way to turn a property setting (from the markup) into a 
page attribute that can be easily searched and retrieved from a page
file.

> If so, what about $SavedProperties set by a script (we use it for  
> hidden meta informations, i.e. page view counter)?

$SaveProperties would be intended only for those properties that
are stored in the markup (i.e., it's part of the edit sequence).
Other scripts that wish to store properties in page files can
already do this by calling WritePage directly.  PmWiki doesn't
remove page attributes unless explicitly told to do so somehow.

> If we set (:title ...:), the title property is saved. If we delete  
> the markup from the page, the title property is deleted at the  
> moment. Do we have to explicitly delete properties in the future, or  
> will this happens automaticly?

Automatically -- when the page markup no longer sets the property,
the corresponding page attribute disappears.

> I think for some properties it would be usefull that $SavedProperties  
> should only be deleted (not longer saved) when explicitly stated via  
> (:property -name:). Maybe we can declare this properties analog to  
> $SavedProperties with a $RetainedProperties variable?

$RetainedProperties is really one of the things that ?action=attr 
is intended to do -- ?action=attr is able to edit any page attribute, 
not just passwords.

Pm




More information about the pmwiki-users mailing list