[Zope] METAL macros

Andreas Jung lists at zopyx.com
Mon Mar 13 01:37:38 EST 2006



--On 12. März 2006 18:00:27 -0800 David <bluepaul at earthlink.net> wrote:

> John Poltorak wrote:
>
>> I'm having difficulty figuring out how to make METAL macros reusable.
>> >>
> Hi John,
>
> This is about as simple as it gets (sorry if i misunderstood your
> question):
>
> (1) Name this page template ptMacros
>
> <html>
>     <body>
>          This is Page Template <em tal:content="template/id">template
> id</em>.
>
> <p metal:define-macro="copyright">
>   Copyright 2001, <em>Foobar</em> Inc.
> </p>
>   </body>
> </html>
>
>
> (2) name this page template ptTest
> <html>
>    <body>
>      This is Page Template <em tal:content="template/id">template id</em>.
>
> <p metal:use-macro="container/ptMacros/macros/copyright">
>  <b metal:fill-slot="name">Copyright goes here</b>
> </p>
>   </body>
> </html>
>

...which is basically the same as in the Zope Book:

<http://www.plope.com/Books/2_7Edition/ZPT.stx#1-12>

-aj


    -----------------------------------------------------------------------
   -   Andreas Jung            ZOPYX Ltd. & Co KG                        -
  -   E-mail: info at zopyx.com   Web: www.zopyx.com, www.zopyx.de         -
   -----------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20060313/a10c59a4/attachment.bin


More information about the Zope mailing list