whats the difference in publishing a zpt and a products-method ?
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. If I call it with: http://localhost:/myProd/externalEdit/test, a not found error is printed 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'] so what is the difference calling a pagetemplate and a products method ? Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
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
participants (2)
-
Chris Withers -
Joachim Schmitz