[ZPT] fill-slot only works in immediately enclosing use-macro?

Brad Clements bkc@murkworks.com
Thu, 29 Nov 2001 15:56:17 -0500


I'm trying to fill a slot defined in a macro that is called from a macro, called from a 
macro, which is called from a body where the fill-slot is included. The slot doesn't seem 
to be filled.

PageTemplate auth_tracking

<html xmlns:ps xmlns:ts
      metal:use-macro="here/Master/macros/master">
  <div metal:fill-slot="main">
  <tal:block omit-tag="" tal:define=
  "shipper options/shipper|nothing; package options/package|nothing; 
	  returnTo options/returnTo|nothing">

	 <div tal:condition="returnTo" align="right">
	 <a tal:attributes="href returnTo">Return</a> to Shipment List
	 </div>
        <div metal:use-macro="here/Track/Body/macros/Body">
          Tracking Body
	  <div metal:fill-slot="SendInfoSlot">
            Send shipment info to someone Nice
          </div>
    </div>
   </tal:block>
  </div>
</html>


The Body PageTemplate uses a bunch of macros from other Templates.. Which in turn 
use other macros, until we reach:

SendInfo PageTemplate  with this:

<div metal:define-macro="SendInfo">
  <div metal:define-slot="SendInfoSlot">
    <div tal:condition="python:user.hasRole(here,['Authenticated'])">
      Send shipment info to someone
    </div>&nbsp;
  </div>
</div>

I'd guess the SendInfo macro is about 3 levels down from the Auth_tracking 
PageTemplate.

When I view this page, I get "send shipment info to someone"

Where I expect "send shipment info to someone Nice"

Am I doing something wrong, or is this a limitation of slots?

Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com               AOL-IM: BKClements