[Zope3-Users] Beginner: Reference to ZPT macros
Achim Domma
domma at procoders.net
Wed Jan 16 13:27:49 EST 2008
Hi,
I have a simple view. Here is the entry in configure.zcml:
<browser:page
for=".CMS.Page"
name="index.html"
class=".CMS.PageView"
permission="zope.Public"
template="index.pt"
menu="zmi_views"
title="Default View"
/>
The view works fine so far, but now I want to use a template macro to
implement a common layout. So I created a layout.pt in the same
folder as index.pt. In index.pt I try to reference layout.pt like this:
<div xmlns:metal="http://xml.zope.org/namespaces/metal" metal:use-
macro="context/@@layout.pt/macros/default_layout">
<div metal:fill-slot="content">
<div tal:content="structure view/html_content"></div>
</div>
</div>
Now I get an TraversalError but I could not figure out why. How do I
have to reference layout.pt? Do I have to register the emplate
somehow? I work with Philips book, but he uses a template created via
ZMI in his example.
regards,
Achim
More information about the Zope3-users
mailing list