I think you're right, Jonothan. A generic workaround would be this: <dtml-in "folder.objectItems()"> <dtml-let transitional_variable=absolute_url> <dtml-var "_.string.split(_.str(transitional_variable), BASE0)[1]" ><br> </dtml-let> </dtml-in> ...always based on T.J.'s message. Ausum ----- Mensaje original ----- De: "Jonothan Farr" <jfarr@real.com> Para: "Ausum" <webmaster@enjoyperu.com>; <zope@zope.org> Enviado: Martes, 06 de Marzo de 2001 09:50 p.m. Asunto: Re: [Zope] Solved: How to get the url without the domain...
Given the fact that the port number is always present in the absolute_url variable (in Zope), it's convenient to use it as a string to delimit the needed part of the url. If this were not the case, I guess it's possible to use any part of the domain name close to the first slash after it.
Boy, that is pretty ugly. What if you move to a different port, or a different host? All of your DTML breaks? I think I'd use the standard urlparse module in an external method or PythonScript, if there isn't an even simpler way of doing it.
--jfarr