On Sun, Feb 25, 2007 at 02:02:43PM +0100, Florian Lindner wrote: > I have a simple problem. A template: > > <html metal:use-macro="views/standard_macros/view" i18n:domain="xgm.de/Blog"> > <body> > <metal:block metal:define-macro="Blog"> > <metal:block metal:fill-slot="body"> > <h1 tal:content="context/title" /> > <div tal:replace="context/description" /> > [...] > </div> > > </metal:block> > </metal:block> > </body> > </html> > > That is registered as view.html.
How? <browser:page name="view.html" template="foo.pt" /> ? > Now I want to use the macro in another page: > > div metal:use-macro="context/Blog/@@view.html/Blog" /> > > (tried different variations) Ah, but did you try metal:use-macro="context/Blog/@@view.html/index/macros/Blog" /> ? When you attach a page template to a view with ZCML, it defines a view attribute 'index' behind the scenes. So, @@view.html refers to the view, @@view.html/index revers to the template, and @@view.html/index/macros refers to the macros defined in that template. Marius Gedminas -- For every complex problem, there is a solution that is simple, neat, and wrong
signature.asc
Description: Digital signature
_______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users