[Zope] Plone Macro Madness

D. Bickle dbickle at uvic.ca
Thu Mar 11 13:59:11 EST 2004


Thanks for the feedback. As I am just a network engineer and not a web
developer I am just interested in a quick-and-dirty solution to
maintaining the same look-and-feel for my pages. The python solution just
proved (to me a least) to be a quick and efficient way to build a dynamic
content. Not wanting to spend huge amounts of time retooling my pages I
need to know of a way of embedding the Plone macros in pages that are
generated in Python (so I can go back to resolving networking issues).
Does such a solution exist or is using ZPT my only option?


On Thu, 11 Mar 2004, Chris Withers wrote:

> 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