[Zope] Export an object via a DTML Method

Dieter Maurer dieter@handshake.de
Mon, 18 Jun 2001 23:13:23 +0200 (CEST)


Nico Grubert writes:
 > I am trying to export a folder "exportFolder" using a DTML Method
 > "exportMethod".
 > I have the following structure in Zope:
 > 
 > Root_Folder
 >    |
 >    |
 >    |-- folder_A
 >    |      |
 >    |      |- exportMethod
 >    |
 >    |
 >    |-- folder_B
 >           |
 >           |
 >           |-- exportFolder
 > 
 > 
 > 
 > How can I export the folder "exportFolder" using some DTML Code within
 > the DTML Method "exportMethod".
 > Within "exportMethod" the path of "exportFolder" is already known as:
 > 
 > 		http://localhost:8080/folder_B/exportFolder
 > 
 > 
 > any ideas ?
I am too lazy to look up the signature of "manage_export",
leave this for you.

You can use:

    <dtml-with folder_B>
      <dtml-call "exportFolder.manage_export(...)">
      <!-- it may become necessary to redirect here -->
    </dtml-with>

If your 'exportMethod' does not have a constant path to the
folder to export, you can use "restrictedTraverse" or
"REQUEST.resolve_url" to resolve a path/url into an object.


Dieter