Hi Michael, I think that the current folder and document are getting confused. (Look to see if the properties are being added to the folder instead!). This worked for me: <dtml-call "manage_addDTMLDocument(id=compteur)"> <dtml-let theNewDoc="_.getattr(PARENTS[0], compteur)"> <dtml-call "theNewDoc.manage_addProperty('type', 'FC', 'string')"> </dtml-let> -steve
"Michael" == Benillouche, Michael <Michael.Benillouche@france.acnielsen.com> writes:
Michael> Hi Tres, Michael> Thanks for your answer, Michael> I did what you say : Michael> <dtml-call "REQUEST.set('compteur_login', _.str(compteur) Michael> )"> <dtml-call Michael> "manage_addDTMLDocument(id=compteur_login)"> <dtml-with Michael> compteur_login> <dtml-call "manage_addProperty('type', Michael> 'FC', 'string')"> </dtml-with> Michael> but only the document is created ; the property is NOT Michael> added . Michael> It looks bizzare, Any other thoughts ? Michael> Michael Michael> -----Message d'origine----- De: Tres Seaver Michael> [mailto:tseaver@palladion.com] Date: lundi 7 février 2000 Michael> 23:41 À: Benillouche, Michael Cc: zope@zope.org Objet: Michael> Re: [Zope] Difference between manage_addProperty on a Michael> DTMLDocument and on a Folder Michael> "Benillouche, Michael" Michael> <Michael.Benillouche@france.acnielsen.com> >> I have the following problem : >> >> When I execute this code : >> >> <dtml-call "REQUEST.set('compteur_login', _.str(compteur) )"> >> <dtml-call "manage_addFolder(id=compteur_login)"> <dtml-call >> "_[compteur_login].manage_addProperty('type', 'FC', 'string')"> >> >> The Folder is created with the property 'type' >> >> But when I execute this code : >> >> <dtml-call "REQUEST.set('compteur_login', _.str(compteur) )"> >> <dtml-call "manage_addDTMLDocument(id=compteur_login)"> >> <dtml-call "_[compteur_login].manage_addProperty('type', 'FC', >> 'string')"> >> >> I have the following error : >> >> Error Type: AttributeError Error Value: 'string' object has no >> attribute 'manage_addProperty' >> >> It seems that manage_addProperty doesn't behave the same way on >> a Folder Michael> and >> a DTMLDocument . Any solution to make it work ? Thanks a lot. Michael> The "_[compteur_login]" is causing the document to be Michael> rendered, I think. Try:: Michael> <dtml-with compteur_login> <dtml-call Michael> "manage_addProperty('type', 'FC', 'string')"> Michael> </dtml-with> Michael> -- Michael> ========================================================= Michael> Tres Seaver tseaver@palladion.com 713-523-6582 Palladion Michael> Software http://www.palladion.com Michael> _______________________________________________ Zope Michael> maillist - Zope@zope.org Michael> http://lists.zope.org/mailman/listinfo/zope ** No cross Michael> posts or HTML encoding! ** (Related lists - Michael> http://lists.zope.org/mailman/listinfo/zope-announce Michael> http://lists.zope.org/mailman/listinfo/zope-dev )