[Zope] How can a document know its own URL?

Chris Withers chrisw@nipltd.com
Mon, 29 Jan 2001 09:36:09 +0000


Joachim Werner wrote:
> 
> >
> > Can anyone tell me how to use DTML to get at the  URL for the document
> > being displayed?
> >
> 
> <dtml-var URL>

That's not really correct. That's the url of the current request, which may well
not be the url of the object you're currently displaying.

<dtml-var absolute_url> is the right one, and works with virtual hosting too ;-)

cheers,

Chris