[Zope] Finding path of an object
Andy McKay
andym@ActiveState.com
Wed, 20 Jun 2001 09:02:25 -0700
> I now this may be a stupid question but I haven't been able to find help
in
> the Zope docs.
>
> How do I find the path to where a specific object is located ?
>
> If i have object foo located in folder bar i want the path to look like
this:
> /foo/bar
>
> I tried with absolute_url and getPhysicalPath ... but neither seemed to
work
Why whats wrong with them? What kind of object?
<dtml-var "_.string.join(getPhysicalPath(), '/')"> works fine
<dtml-var absolute_url> works, but adds in the server, so you might want to
hack that out, for example <dtml-var
"absolute_url()[_.len(REQUEST['SERVER_URL']):]">
Cheers.
--
Andy McKay.