[Zope] Finding path of an object
Gitte Wange
gitte@mmmanager.org
Wed, 20 Jun 2001 18:01:17 +0200
On Wednesday 20 June 2001 18:02, you wrote:
> > I now this may be a stupid question but I haven't been able to find h=
elp
>
> 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 li=
ke
>
> 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 wan=
t to
> hack that out, for example <dtml-var
> "absolute_url()[_.len(REQUEST['SERVER_URL']):]">
>
I just used absolute_url(relative=3D1)
Seems to work :-)
Thanx for the help everyone ..
Regards,
--=20
Gitte Wange Jensen
Sys Admin, Developer and a lot more
MMmanager.org Aps, Denmark
Phone: +45 29 72 79 72
Email: gitte@mmmanager.org
Web: www.mmmanager.org
Quote of the day:
Den bedste chef er den, som har d=F8mmekraft nok til at v=E6lge gode
mennesker til at g=F8re det, han selv ville have gjort, og selvbeherskels=
e
nok til at afholde sig fra at blande sig i deres arbejde, mens de g=F8r d=
et.
- Theodore Roosevelt