Am Mittwoch, 16. Januar 2008 19:27 schrieb Achim Domma:
> 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=""
>        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 in the same
> folder as In I try to reference like this:
> <div xmlns:metal=""; metal:use-
> macro="context/">
>      <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 Do I have to register the emplate
> somehow? I work with Philips book, but he uses a template created via
> ZMI in his example.

Hav a look at skin/ in the worldcookery examples: There you 
can see the mechanism that allows other pages to access the macros.

I personally don't like macros that much, therefore I prefer Stephan Richters 
pagelet/viewlet approach, which you can find in z3c.pagelet.

Best Regards,

GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
Zope3-users mailing list

Reply via email to