[Zope] nested metal macros
Antonio Beamud Montero
antonio.beamud at linkend.com
Tue Aug 22 02:46:19 EDT 2006
Hi all:
I'm trying to nest several macros but only the last is showed.
I define for example macroA with a slot named slotA for example.
macroB uses macroA and fills slotA, but also defines a slot.. something
like this:
----------------- MacroA
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:define-macro="macroA">
<head>
<span metal:define-slot="slotA">
</span>
----------------- 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>
-----------------Page
And last I use the macroB with:
<div xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="container/macroB/macros/macroB">
<span metal:fill-slot="slotB">
<br>Hello!
</span>
</div>
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...
It's posible to nest macros this way?
Greetings.
More information about the Zope
mailing list