[Zope] nested metal macros

Antonio Beamud Montero antonio.beamud at linkend.com
Tue Aug 22 13:21:59 EDT 2006


El mar, 22-08-2006 a las 19:13 +0200, Dieter Maurer escribió:
> Antonio Beamud Montero wrote at 2006-8-22 08:46 +0200:
> > ...
> >----------------- MacroB
> ><div xmlns:metal="http://xml.zope.org/namespaces/metal"
> >     metal:use-macro="container/macroA/macros/macroA">
> ><span metal:fill-slot="slotA">
> >   <div align="center" metal:define-macro="macroB">
> >      <span metal:define-slot="slotB"></span>
> >   </div>
> ></span>
> ></div>
> 
> "macroB" is only the inner "div" not the complete content of
> your page template.
> 
> > ...
> >I think all the process is as follows:
> >Page calls macroB, macroB calls macroA, and all the code is rendered,
> >the problem is only the code inside macroB is rendered... 
> 
> "macroB" does not call "macroA" because "macroB" does not
> contain a "use-macro" for "macroA".
> 
> >It's posible to nest macros this way?
> 
> Not the way you try it...

Ok... I want to define a template (like a skeleton), other template
(like the body of the skeleton) and lot of templates in sections of the
body of the skeleton and reuse the skeleton and the body across all my
web... How I can do that? It's posible or only one level of macro
definitions is posible? Where I can find examples or resources about
that...?

A lot of thanks.

> 
> 



More information about the Zope mailing list