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

Gary Lowder gary@lowder.com
Sun, 28 Jan 2001 12:56:09 -0600


The answer you want lies in "REQUEST".

To see all that's available with REQUEST, try <dtml-var "REQUEST">
somewhere in your document.

This should do what you want:

      You are viewing this url:<dtml-var "REQUEST.URL">

Hope this helped.

Gary.



> Brendon Grunewald wrote:
> 
> Can anyone tell me how to use DTML to get at the URL for the document
> being displayed?
> 
> I want to display the URL of the document being displayed inside of
> the document being displayed.
> Something like:
> 
> <b>
>   You are now viewing the following URL: <dtml-var Some_DTML_var>
> </b>
> 
> Similar to the <dtml-var title_or_id> var, but for the whole URL not
> just the documents name or title...
> 
> I've tried looking at the mailing list archives, but it is either not
> there or my search criteria are not as accurate as they should...
> 
> ---
> Brendon Grunewald
> 
> 70South: The no1. source for Antarcticles.
> Updated daily with the latest news and views on Antarctica and other
> polar issues.