[Zope] Problems with manage_clone

Rik Hoekstra rik.hoekstra@inghist.nl
Tue, 4 Apr 2000 21:41:41 +0200




>a.wacknitz@francotyp.com wrote:
>
>> Second, how can I parameterize the location where the clones will be
added?
>> For the moment my solution is to copy the document that calls the
>> manage_clone() method to the destination folder for the clones...

Hm, what about just calling the 'document' from the destination folder. In
that way, the namespace stack will be set automatically. To be sure: make
that a DTML method, or you'll end up with the cloned objects in your root
;-()


>
>Let's say you have a string property or dtml-let that assigns a folder
>id to "newhome".
>
><dtml-with _[newhome]>
> <dtml-call manage_clone()>
></dtml-with>
>
>If you need it to be deeper, you can do
><dtml-with _[someroot]._[somefolder]._[somehome]>
>but that may need to be
><dtml-with "_[someroot]._[somefolder]._[somehome]">
>
>Check the "namespaces howto" for more information on _[] and other
>wierdness
>
>You probably want to wrap that in a <dtml-if>, because if "newhome"
>doesn't exist, you'll get an error.
>



Rik