Hey, As you'll hear shortly, ZClasses & DTML are the old way to do things, and are not highly recommended, at this point. Having said that, I've had success using them. To Add a ZClass into anything folderish, I've used... <dtml-call "RESPONSE.redirect('manage_addProduct/WWAudioClip/WWAudioClip_factory')"> where WWAudioClip was the name of the Product and its ZClass I place this in a DTML Method that is at the point I wish the ZClass object to be created, a target if you wish. Works fine. This will call the "Add" method in your ZClass. To Add a regular file object somewhere, I've used.. <dtml-call "this().manage_addFile(File_object_ID, File_object_contents, File_object_title, content_type='audio/mpeg')"> Parameters Zope ID to be set, Contents (string, whatever), and Zope Title, and mime-type (optional) Google "Zope manage_addFile" for more info HTH, Jon Allen Huang wrote:
I want to create a empty file in a ZClass object when I first created the ZClass object. How do I do that using DTML??
------------------------------------------------------------------------ Yahoo! FareChase - Search multiple travel sites in one click. <http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/>
------------------------------------------------------------------------
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Jonathan Cyr cyrj@cyr.info