[ZPT] macro's

Evan Simpson evan@zope.com
Thu, 04 Oct 2001 10:19:42 -0400


Tom Deprez wrote:

> I think I misunderstand the use of macro's:


I don't think so, but let's see...

> 
> I made a master_page macro which I want to use for all of my index_html 
> pages.
> 
> I made some index_html pages and now I changed something on the master_page.
> 
> Isn't it supposed that this change is adapted by the index_html pages as 
> well?


Yes, it is

 
[changed a slot definition] 
> but the pages which use the macro didn't updated the width of their td tag

Slots are "owned" by the slot filler.  If you don't explicitly fill a slot, 
then the definition gets copied into your macro use, otherwise the tag type 
and all attributes of the fill-slot overwrite those of the define-slot.  If 
you don't want the <td> to be specialized in macro uses, you should do 
something like:

<td ...><div metal:fill-slot="navigator"></div></td>

Cheers,

Evan @ Zope