Re: [Zope] Re: View classes based on Page Templates in Zope2
Has anybody written a convenient class like this? Perhaps based in PageTemplateFile or something? from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile Cool. Thanks. I'll have a play. -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: View classes based on Page Templates in Zope2
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter Bengtsson wrote: Jens Vagelpohl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12 Nov 2006, at 13:12, Peter Bengtsson wrote: What options do we have for this in Zope2? If Five is the answer, what options do we have without Five? Five is the best answer. Why would you not want to use it? I stated my question badly. I meant, are there any implements OTHER than Five. Just like without Plone there's CPS for example. Perhaps a one dedicated solution just for this particular use case. This *is* the sweet spot for Five. It ships in the Zope core for just this purpose: to make Zope3 technologies available from within Zope2. Why wouldn't you use Five? Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFWKvF+gerLs4ltQ4RAj5WAJ4vFrWKog/E6DIkv1xYOOgjYTvtrgCeLBcJ uoX6/ytXw+32zpJsBUfrtTI= =mLFk -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: View classes based on Page Templates in Zope2
Peter Bengtsson wrote: Something I like about Zope3 is the View classes. What I like about it especially is that it's a brilliant place for putting in little extra silly python methods that are specific to your template rather than the object class. Eg. class ViewProduct(BrowserPage): __call__=ViewPageTemplateFile('productview.pt') def showPrice(self, product): return £%.2f % product.getPrice() What options do we have for this in Zope2? If Five is the answer, what options do we have without Five? Has anybody written a convenient class like this? Perhaps based in PageTemplateFile or something? from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile -- http://worldcookery.com -- Professional Zope documentation and training ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )