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
_______________________________________________
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 )

Reply via email to