[Zope] addDTMLDocument Help!

brian.brown@smawins.com brian.brown@smawins.com
Wed, 04 Aug 1999 10:16:14 -0700


Greetings!
I'm building some methods that allow me to add DTML Documents and then add and 
set properties to them. I'm able to add the Document and set the properties. The next thing I want to do is giving me fits, though. I want to specify a method or document to be copied into the content of the newly created DTML document. So far, I have tried using the 'file' parameter in the manage_addDTMLDocument routing, as well as the manage_edit method of the newly created document. If I pass in a simple text string(no DTML), that works fine - but if I pass in a DTML method or Document, it breaks. Here is some of the code I tried:

<!--#call "manage_addDTMLDocument(newid,newtitle,content_template)"-->

Without the 'content_template' it works fine. 'content_template' is a DTML method, and it does contain a couple of DTML tags.

I also tried:
<!--#call "_.getitem(REQUEST['newid']).manage_edit(_.getitem('mycontent'),'')"-->

with mycontent being first a DTML method, and then POSTed in via a hidden field. 

Any ideas?

Brian