Hi, I'm actually making a form which widgets list and types are built dynamically. The basic idea is to use ZPT macros from a script to build the content of the form. I found the way to get ZPT macros in Pyhton scripts... macro = some_template.macros['some_macro'] But I'm stuck hacking deeper into the metal logic. I need now a way to execute these macros, feed them with variables (here, options, foo, bar...) and fill the slots. Has any of you some hints or examples to achieve this? Many thanks in advance. --Gilles
Gilles Lenfant wrote:
The basic idea is to use ZPT macros from a script to build the content of the form.
Believe it or not, the most straightforward way to do this is probably the following "macro_user" ZPT: <metal:x use-macro="options/macro" /> Your script would use it as follows: txt = macro_user(some_template.macros['some_macro']) Cheers, Evan @ 4-am
participants (2)
-
Evan Simpson -
Gilles Lenfant