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

2001-01-29 Thread Chris Withers

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

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




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

2001-01-29 Thread Dieter Maurer

Chris Withers writes:
  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 ;-)
It depends what you mean by "the URL of a document".

If the "document" happens to be a DTML method, then
"dtml-var absolute_url" does not return the URL of the method.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




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

2001-01-28 Thread Brendon Grunewald



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 
documentbeing 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.


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

2001-01-28 Thread Joachim Werner

 
 Can anyone tell me how to use DTML to get at the  URL for the document 
 being displayed?
 

dtml-var URL

Sometimes, things can be so easy ;-)

Joachim.




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )