Re: [Zope] Syntax for getting property sheet
Ahh.... I think I managed to come up with something like this but I left off the mapping attribute on the dtml-in and was getting some type of error I couldn't interpret. I'll give this a shot later tonight. -Jon Tres Seaver <tseaver@palladion.com> writes:
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
participants (1)
-
Jon Prettyman