[Zope] Getting the path of an Object

Daniel G. Rusch drusch@globalcrossing.com
Tue, 14 Mar 2000 15:54:29 -0600


Hey all, hope this one is relatively easy...

Background:
1. I have a zope site with folders, subfolders (possible several levels
of subfolders) and objects in them.
2. I built a simple interface to allow a user (with the correct
permissions) to see the tree. 
3. In the UI, each item (folder, subfolder, object etc) has a check box.
Kinda like the Zope UI


The question:
A user checks an object (folder, subfolder, object etc), how do I get
the path to the object that is checked.

i.e.

FolderA
	SubFolderB
		SubFolderC
			index_html

Suppose the user checked index_html in subFolderC. 
How do I get the path (which would be
FolderA/SubFolderB/SubFolderC/index_html)

The test code I am using looks like this (it's in a DTML Method):

<dtml-var standard_html_header>
<FORM ACTION="WhichFilesToExport" METHOD="POST">
<dtml-tree branches=objectValues>
  <INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="<dtml-var PATH_INFO>" >
        <IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>">
       <dtml-var id>
</dtml-tree>
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Submit" >
<dtml-var standard_html_footer>

Using PATH_INFO obviously wont work since it returns the PATH_INFO of
this method and not the PATH_INFO of the checked item.


Any thoughts????????????

Thanks,
DR