[ZPT] Re: [Zope3-dev] TAL Macro Parameters

Chris Withers chrisw at nipltd.com
Fri May 23 11:35:44 EDT 2003


Shane Hathaway wrote:
 > Comments are welcome.  To avoid cross-posting, Wiki comments are
 > preferred over email comments.

Yes, but the number of people who read Wiki comments is pretty small ;-)

> Ken and I brainstormed a way to solve a problem with METAL.  METAL 
> macros often need parameters, but the language does not support them. 
> Here is our proposal:
> 
> http://dev.zope.org/Wikis/DevSite/Proposals/MacroParameters

I'm with Magnus on this one. METAL has always just been about textual 
substitution. Turning it into something akin to a function call seems like a 
complexity nightmare :-S

The proposed syntax also seems confusing.

If this is _really_ required, perhaps a 'metal:parameters' syntax could be 
added, which would make your examples:

<div metal:define-macro="standard"
      metal:parameters="a;
                        b;
                        c python:0">

<div metal:use-macro="here/main_template/macros/standard;"
      metal:parameters="a string:x;
                        b somevar">

Finally, under the proposed code, how would you go about getting things to 
behave like thery do now?

cheers,

Chris




More information about the ZPT mailing list