14 Dec
2001
14 Dec
'01
9:53 a.m.
Your "manage_addProperty" operates on the current object and not the newly created one.
Use:
<dtml-let newid="REQUEST['topic']"> <dtml-call expr="addDTMLDocument(id=newid,title=REQUEST['topic'])"> <dtml-with expr="_.getitem(newid)"> <dtml-call expr="manage_addProperty('name',REQUEST['poster'], 'string')"> </dtml-with> </dtml-let>
And by the way you should really write this kind of code in python script, not DTML: newid = REQUEST['topic'] context.addDTMLDocument(id=newid, title=REQUEST['topic']) newobj = getattr(context, newid) newobj.manage_addProperty('name', REQUEST['poster'], 'string') Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 10 http://nuxeo.com mailto:fg@nuxeo.com