[Zope] Plone Macro Madness

Chris Withers lists at simplistix.co.uk
Thu Mar 11 06:41:05 EST 2004


D. Bickle wrote:

> The code looks something like this:
> print '<html metal:use-macro="here/dialup_template/macros/dialup"></html>'
> 
> Then some more dynamic HTML in Python....
> 
> print '<div class="footer"
> metal:use-macro="here/footer/macros/portal_footer">Footer</div>'
> return printed

Not sure what you're expecting to have happen here...

the statement:

print '<div class="footer"
   metal:use-macro="here/footer/macros/portal_footer">Footer</div>'

...is not going to invoke the ZPT parser, compiler or renderer.

Why are you trying to assemble stuff like this in a python script?

I'd turn your python script into a ZPT and just do the substitutions there as 
normal...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk




More information about the Zope mailing list