[Zope] Relative URLs
Cornelis J. de Brabander
brabander@fsw.LeidenUniv.nl
Mon, 07 Jan 2002 15:58:18 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_001E_01C19794.20BE9740
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
"object.absolute_url()" will help
cb
Cornelis J. de Brabander
==========================================
Department of Education, Leiden University
P.O.Box 9555, NL-2300 RB Leiden
+31 71 527 3422/3401
brabander@fsw.leidenuniv.nl
==========================================
-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Tim
Owen
Sent: maandag 7 januari 2002 11:31
To: zope@zope.org
Subject: [Zope] Relative URLs
Hi Folks,
Quick remedial question. How do I get folder names removed from a URL
after calling an object lower in the folder tree?
Example:
folder1
folder2
A folder1 object calls folder2 object using href like folder2/object
then folder2 object calls folder1 object by name (using href with no path
since it is higher in the folder tree). The URL does this:
folder1/object
folder1/folder2/object
folder1/folder2/folder1/object
I would like this to happen:
folder1/object
folder1/folder2/object
folder1/object
Thanks in advance.
___________________
Tim Owen
Cell: 517.285.7071
Home: 989.224.4905
eFax: 425.940.5905
------=_NextPart_000_001E_01C19794.20BE9740
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3612.1706"' name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><SPAN class=3D990185714-07012002><FONT color=3D#0000ff face=3DArial =
size=3D2>"object.absolute_url()" will help</FONT></SPAN></DIV>
<DIV><SPAN class=3D990185714-07012002><FONT color=3D#0000ff face=3DArial =
size=3D2></FONT></SPAN><SPAN class=3D990185714-07012002><FONT =
color=3D#0000ff=20
face=3DArial size=3D2>cb</FONT></SPAN></DIV>
<DIV> </DIV>
<P><FONT size=3D2>Cornelis J. de=20
Brabander<BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>Dep=
artment of=20
Education, Leiden University<BR>P.O.Box 9555, NL-2300 RB Leiden<BR>+31 =
71 527=20
3422/3401<BR>brabander@fsw.leidenuniv.nl<BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D</FONT>=20
</P>
<DIV> </DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #0000ff solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
<DIV class=3DOutlookMessageHeader><FONT face=3D"Times New Roman"=20
size=3D2>-----Original Message-----<BR><B>From:</B> =
zope-admin@zope.org=20
[mailto:zope-admin@zope.org]<B>On Behalf Of</B> Tim =
Owen<BR><B>Sent:</B>=20
maandag 7 januari 2002 11:31<BR><B>To:</B> =
zope@zope.org<BR><B>Subject:</B>=20
[Zope] Relative URLs<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Hi Folks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Quick remedial question. How =
do I get=20
folder names removed from a URL after calling an object lower in the =
folder=20
tree?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Example:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>folder1</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> folder2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>A folder1 object calls folder2 =
object=20
using href like folder2/object then folder2 object calls folder1 =
object by=20
name (using href with no path since it is higher in the folder =
tree). =20
The URL does this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>folder1/object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>folder1/folder2/object</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>folder1/folder2/folder1/object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I would like this to =
happen:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>folder1/object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>folder1/folder2/object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>folder1/object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>___________________<BR>Tim =
Owen<BR>Cell:=20
517.285.7071<BR>Home: 989.224.4905<BR>eFax:=20
425.940.5905</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_001E_01C19794.20BE9740--