[ZPT] absolute url of a page template

Shane Hathaway shane@zope.com
Sat, 19 Oct 2002 21:49:23 -0400


Florent Guillaume wrote:
> Clint Brubakken  <cabrubak@inetic.com> wrote:
> 
>>I have a product the defines some PageTemplates via PageTemplateFile and
>>I'm trying to get the absolute url of the template itself. 
>>
>>when I try :
>>here/Products/manage_main/absolute_url 
>>it became:
>>http://linux1:8080/AAA/Products/ 
>>
>>how can I do this? 
> 
> 
> absolute_url has a meaning for "objects", not "methods". And the
> PageTemplateFile you're using definitely looks like a method (that is, a
> View in Z3 terms).

You're right, but methods in Zope have URLs too. :-)  Notice the 
trailing slash... the problem is that the absolute_url() method thinks 
the PageTemplateFile has an empty string for an ID.  There is a 
collector issue for it.

Shane