[Zope3-dev] ZPT TTW Metal use-macro evaluation....

Craig Ewington ewington at adelphia.net
Mon Nov 8 09:36:33 EST 2004


Congratulations on the ZopeX3-3.0.0 final release!!    I'm new to Zope 
(as of a couple of months) but finding it a very good fit for my 
current project.  I really admire everyone's dedication to this effort 
- thank you all.

--------
I have a question regarding Zope Page Templates:

 From the browser (i.e. TTW) I created a ZPT page and entered the 
following source definition:

<html metal:use-macro="views/standard_macros/page">
<div metal:fill-slot="body">
Test Content
</div>
</html>


With 'expand macros' checked I get a warning that the macro expansion 
fails as follows...

<!-- Page Template Diagnostics
  Macro expansion failed
  exceptions.KeyError: 'views'
-->

After poking around the Zope3-dev list for a bit, I changed the source 
definition to:


<html metal:use-macro="context/standard_macros/page">
<div metal:fill-slot="body">
Test Content
</div>
</html>

I get a similar error message:

<!-- Page Template Diagnostics
  Macro expansion failed
  exceptions.KeyError: 'context'
-->


I had presumed that I was able to enter METAL statements into a TTW  
ZPT page - perhaps this is not correct?  Does anyone understand how to 
make this work?  I'm using the final release version of Zope3, checked 
out from svn this morning.


Thanks for your help.


- Craig Ewington



More information about the Zope3-dev mailing list