[Zope] Passing arguments to a ZPT

Johan Carlsson [EasyPublisher] johanc@easypublisher.com
Sun, 23 Mar 2003 13:10:28 +0000


At 22:22 2003-03-22 +0100, Max M said:
>Johan Carlsson [EasyPublisher] wrote:
>
>>I'm trying to use a centralized ZTP which could be called from  other 
>>tempate/methods.
>>I want to pass arguments to the ZTP to be able to customized it.
>
>
>Most likely you should be using metal:template for this kind of work! A 
>template acts like a function, only that it takes complicated ZPT as 
>arguments. It really is the superior way. Please do try it out. It sounds 
>more complicated than it actually is.

Yes, indeed after converting some of the DTML-methods to metal macros
things get a bit easier. Still I have measured a 30% speed penalty between the
metal-template and the DTML Methods.

One thing that feels very inconsistent is that I have to use 
metal:use-macro to include
a macro instead of using tal:content="dtml_method".
I guess I could start using tal:replace with dummy tags, it might be what I 
should do anyway,
to also be able to present a renderable mock-up default.

Best Regards,
Johan  Carlsson


-- 
Easy Publisher Developers Team
Johan Carlsson
johanc@easypublisher.com

Mail:
Birkagatan 9
SE-113 36  Stockholm
Sweden

Phone +46-(0)8-32 31 23
Fax +46-(0)8-32 31 83
Mobil +46-(0)70-558 25 24
http://www.easypublisher.com