[Zope] Syntax for getting property sheet

Tres Seaver tseaver@palladion.com
Tue, 07 Mar 2000 18:03:39 -0600


Jon Prettyman <jprettyman@acm.org> wrote:
> 
> If I have a ZClass with a property sheet called 'Info', how can I get
> access to the sheet when I DON'T have an instance of that ZClass to
> work with.
> 
> Specifically, I want an ADD form for my ZClass that has an ID field
> and a dynamically generated section containing all the properties from
> 'Info' all on ONE from.  I can't seem to figure out how to dynamically
> generate the property section without an instance to work with.


 <dtml-with "manage_addProduct[ 'MyProduct' ]"> <!-- NB square brackets! -->
   <dtml-in "MyZClass.propertysheets.Info.propertyMap()" mapping> 
     <!-- property meta-info available here, see
          $ZOPE_HOME/lib/python/OFS/properties.dtml for sample
          usage -->
   </dtml-in>
 </dtml-with>

-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com