[z3-five] Re: yet more ZCML / template binding trouble

Rob Miller ra at burningman.com
Wed Jun 15 21:03:06 CEST 2005


Sidnei da Silva wrote:

> On Wed, Jun 15, 2005 at 02:24:38AM -0700, Rob Miller wrote:
> | ugh, this is frustrating.  each time i think i'm going to get it 
> | working, another issue arises to thwart me.
> <snip>
> | - when i modify my five_template.pt so that it contains a 
> | metal:use-macro="here/main_template/macros/master", the main_template is 
> | found and rendered... HOWEVER, none of my metal:fill-slot attributes are 
> | honored... i end up w/ a nice looking plone site wrapper, but with a 
> | completely empty central content area.  this is true even when i just 
> | stick some static text in there... once i call in the main_template, i 
> | no longer have the ability to change the output of the page at all
> 
> My bet is that it's just a issue with how slots work. I've got into a
> similar situation before and it ended up being either a typo on the
> slot name, or misunderstanding how slots get filled.

this may be so, but it's a pretty simple slot substitution.  here's the 
five_template.pt from my simplest failing case:

<tal:block metal:define-macro="page">
<html metal:use-macro="here/main_template/macros/master">

  <metal:block fill-slot="main">
    SOMETHING SHOULD BE HERE
  </metal:block>

</html>
</tal:block>


the add.pt pulls in this template's "page" macro correctly, and is able 
to fill slots (when i define them) on this page w/o trouble.  this page 
will pull in main_template's "master" macro, but is unable to fill the 
slots.  i'm pretty sure that in most cases this syntax would work.  whit 
suggested to me that there may be some disconnect in the metal namespace 
across the Z2->Z3 boundary, which sounds reasonable, but as i said i 
haven't had any luck in figuring out where this disconnect might be. 
i've done lots of complex tal/tales/metal coding in my time, but am not 
familiar enough w/ the internals of the tal interpreter to know where to 
look on a problem like this.

-r



More information about the z3-five mailing list