[Zope] Relative URL property?

Dieter Maurer dieter@handshake.de
Mon, 17 Feb 2003 00:04:48 +0100


Kamal Gill wrote at 2003-2-14 17:21 -0800:
 > I know there must be a simple answer to this question, but I have thus 
 > far been unable to find it.
 > 
 >    How do I obtain the relative URL of each object in the list of search 
 > results?
 > 
 > For example, if I have an page template named "foo.html" in folder 
 > "/spam/eggs/" listed as a search result, how do I obtain 
 > "/spam/eggs/foo.html"?  There does not seem to be a relative_url 
 > property, similar to absolute_url but without the 
 > "http://servername.xyz" prefix.
 > What I need to return is the relative URL for each search result, since 
 > the absolute_url property adds a port 8080 (e.g. 
 > http://servername.xyz:8080/spam/eggs/foo.html), assuming Zope is 
 > running on port 8080.
Does the "getPath()" method does not return a relative URL?


Dieter