[ZPT] METAL changes in SPT 1.4.1 has broken my ZPT...

Tony McDonald tony.mcdonald@ncl.ac.uk
Tue, 16 Oct 2001 09:58:42 +0100


On 15/10/01 3:45 pm, "Evan Simpson" <evan@zope.com> wrote:

> Tony McDonald wrote:
> 
>> I've upgraded to ZPT 1.4.1 under Zope 2.4.0 and the behaviour of METAL seems
>> to have changed.
> 
> 
> It's been cleaned up a lot, yes.
> 

Certainly has - it's great to see the CVS commits going through...

>> <!-- Page Template Diagnostics
>>  Compilation failed
>>  TAL.TALDefs.METALError: fill-slot must be within a use-macro, at line 7,
>> column 1
>> -->
>> <html 
>> metal:use-macro="here/standard_look_and_feel/macros/master">
>>   <head>
>>     <title tal:content="template/title">The title</title>
>>   </head>
>> <body metal:fill-slot="body" >
>> <div metal:fill-slot="main"
> 
> If this ever worked as written, it was a bug.  Your fill-slot="main" doesn't
> have a use-macro to fill.  ZPT just didn't complain about this before.
> 

Ok, now I'm really baffled. I've been staring at your message, and the help
documentation since last night when I received the email.

The code has certainly worked in the past, so I *guess* that's a good thing.

In my standard_look_and_feel, I have the following;

    <div metal:define-slot="main">
     If you supply a tag with a 'fill-slot="main"' attribute
     when using this macro, that tag will replace this text.
This is the main block. It contains everything.
     </div>

And 

<body define-macro="body" ...

So, does that mean I need to change my <div metal:define-slot="main"> to be
<div metal:define-macro="main"> - nope, that didn't work.

The error message says fill-slot must be within a use-macro, but isn't my
<html use-macro ...> enclosing *both* the <body metal:fill-slot="body"> and
<div metal:fill-slot="main"> tags?


I must admit, I'm quite lost on this one. :(

tone
-- 
Dr Tony McDonald,  Assistant Director, FMCC, http://www.fmcc.org.uk/
The Medical School, Newcastle University Tel: +44 191 243 6140
A Zope list for UK HE/FE  http://www.fmcc.org.uk/mailman/listinfo/zope