[Zope] Calling a ZPT macro, with parameters, from a python script

Sean F wsfulmer at gmail.com
Wed Aug 29 14:58:31 EDT 2007


Is there a way to call a specific macro in a ZPT from a python script?

So far, the only way I've found to do this is by calling the macro template
from another template, then calling the wrapper, like:

wrapper:
<metal:wrapper 
      use-macro="python:path('here/my_macros/macros/'+options['macro'])" />

script:
context.my_wrapper(macro='my_macro',foo='whatever')

Is there a way to do this without wrapping the macro template in another
template call?
-- 
View this message in context: http://www.nabble.com/Calling-a-ZPT-macro%2C-with-parameters%2C-from-a-python-script-tf4349720.html#a12393499
Sent from the Zope - General mailing list archive at Nabble.com.



More information about the Zope mailing list