[Zope] whats the difference in publishing a zpt and a products-method
?
Chris Withers
chrisw@nipltd.com
Wed, 22 Jan 2003 15:38:53 +0000
Joachim Schmitz wrote:
> Hi,
>
> I have developed a folderish product, with a method:
>
> def externalEdit(self,REQUEST,RESPONSE):
> """Publish the object to the external editor helper app"""
> return REQUEST
>
> If I call this with:
>
> http://localhost:/myProd/externalEdit, the request is printed.
Indeed.
> If I call it with:
>
> http://localhost:/myProd/externalEdit/test, a not found error is printed
That's what you would expect, surely?
> I also have a pagetemplate eetest in the myProd-folder, which simply
> contains:
>
> <span tal:content="structure request"></span>
>
> If I call this with:
>
> http://localhost:/myProd/eetest/test the request is printed, with
>
> traverse_subpath ['test']
Likewise.
> so what is the difference calling a pagetemplate and a products method ?
A lot, PageTemplates implement the Bindings interfaces, which lets them process
traverse_subpath and the like. Class methods are very simple and do what you
tell them to. They have very few attributes, none of which are called 'test' ;-)
cheers,
Chris