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

Philipp von Weitershausen philipp at weitershausen.de
Mon Nov 8 13:42:11 EST 2004


Craig Ewington wrote:
> 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">

Your research regarding 'views' is right. We don't use it anymore; 
instead, it is recommended to use standard Zope traversal. The above 
line is almost correct in that aspect, it would be better with the view 
traversal indicators (@@):

   context/@@standard_macros/page

Otherwise Stephan's right, Zope X3 is not about TTW development but 
filesystem-based code.

Philipp




More information about the Zope3-dev mailing list