[ZPT] Metal and macros

Evan Simpson evan@digicool.com
Mon, 23 Jul 2001 15:40:11 -0400


Tino Wildenhain wrote:

>>>    from Products.PageTemplates.ZopePageTemplate import TALGenerator
> 
> Hm. This does not fit very well into the concept of ZPT imho.
> Rather the mechanism should provide control over the DOM.

The TALGenerator class already exists, and has the methods that I used 
in my example.  The only change necessary to make it available for 
restricted use is a few security declarations.

A DOM-based interface, on the other hand, would be a major undertaking. 
  Neither TAL nor ZPT ever build a DOM to do their work.

I suspect that TALGenerator used in a Script would be a fine way to 
provide a small dynamic macro containing HTML (or XML) that would be 
complicated to express in TAL.

Cheers,

Evan @ digicool