Integrating METAL into Zope Product
I've got a Zope product which will render itself using standard_html_header and standard_html_footer if they exist. I would like this same product to look for a specific Page Template (ptMaster) and render itself using a macro and filling a slot with it's contents. Any pointers/examples on integrating METAL into a product? Thanks, -- Brian Brinegar Web Systems Developer Engineering Computer Network
Define it as a class attribute class MyProduct(...): ptMaster = PageTemplateFile('ptMaster', globals()) index = PageTemplateFile('index', globals()) ptMaster.pt will then have to look like this:: <html metal:define-macros="headerfooter"> <body metal:define-slot="body"></body> </html> and index.pt:: <html metal:use-macros="here/ptMaster/macros/headerfooter"> <body metal:fille-slot="body">BODY!</body> </html> Brian Brinegar wrote:
I've got a Zope product which will render itself using standard_html_header and standard_html_footer if they exist. I would like this same product to look for a specific Page Template (ptMaster) and render itself using a macro and filling a slot with it's contents.
Any pointers/examples on integrating METAL into a product?
Thanks,
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
participants (2)
-
Brian Brinegar -
Peter Bengtsson