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

Tony McDonald tony.mcdonald@ncl.ac.uk
Wed, 17 Oct 2001 09:53:09 +0100


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

> Tony McDonald wrote:
> 
>> 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?
> 
> Your intent isn't at all clear to me.  Presumably, the use-macro on 'html'
> matches a define-macro on 'html' in standard_look_and_feel, and the
> fill-slot on 'body' similarly matches a define-slot.  So far so good.
> 
> Now, is the 'div' define-slot inside of the 'body'?  That would be an error,
> since it makes no sense to define a slot inside of a slot.  Is there another
> macro definition involved here somewhere?
> 

A *huge* light has gone on here in Newcassle. I had removed the
<body metal:fill-slot="body"> metal definition beforehand, ie
<body>
And found that that made the PT work again, but I wasn't sure quite why that
had fixed it.

I had no idea that a slot within a slot was bad news, so many thanks for
pointing this out Evan (I will update my mini-METAL HowTo later on and tell
the list).


> Perhaps you can show me standard_look_and_feel and this other page, stripped
> down to only tags that have METAL markup?
> 

No need now thanks, everything is working again, and besides, my ZPT is too
awful to show the outside world ;).

Cheers Evan,
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