[Zope] Re: Re: page templates!?
Arian de Wit
adewit@niwa.cri.nz
Fri, 20 Apr 2001 12:56:16 +1200
Hi all,
I had this same problem (ZPT wasn't processing things) using the
example and had made a (presumably) silly mistake -- I had
created the two objects in the example as DTML Document or
DTML Method objects. Once I surmised that there was a new
object available in the Add... list (Page Template) and used that for
both objects, it worked (sort of).
Problem I have now is that it gives a KeyError in response to
"here/Title":
exceptions.KeyError on Title in "<PathExpr standard:here/Title>"
(BTW, the < and > should be html-quoted -- the browser displays
just:
exceptions.KeyError on Title in ""
which is less useful and required me to look at the source -- not a
great hardship, but still...)
Both objects have a Title defined, so what might be causing this?
And does "here" mean the master macro template
(standard_lf.html in the example), or the "client" template
(welcome.html)? Since they both have titles I figured trying it would
let me know, but it's not working, so I have to ask. :-)
Excuse me if I'm being thick -- entirely possible, I admit.
Many thanks,
Arian
> From: "Evan Simpson" <evan@digicool.com>
> To: "daniel dias" <diask8@yahoo.com.br>, "ZopeList" <zope@zope.org>
> Subject: Re: [Zope] page templates!? Date: Thu, 19 Apr 2001 12:16:30
> -0400
>
> From: "daniel dias" <diask8@yahoo.com.br>
> > <div metal:define-slot="main">
> > If you supply a tag with a 'fill-macro="main"' attribute
> > when using this macro, that tag will replace this text.
> > </div>
>
> > <div metal:fill-slot="main">
> > <p>Welcome to the machine</p>
> > </div>
>
> > when I call template above it only shows the text "Welcome to the
> machine".
>
> That is what should happen.
>
> > shouldn't appear " If you supply tag with '
> > fill-macro="main " ' attribute when using this macro,
> > that tag will replace this text. " too?
>
> No, that's the point of slots. If you supply a fill-slot with a
> matching slot name, the fill-slot tag replaces the define-slot tag.
>
> Cheers,
>
> Evan @ digicool
>
------------------------------------------------------------------
Arian de Wit, MSc(Hons), i-Net+, MCSE
Information Systems Integration Manager
NIWA (National Institute of Water & Atmospheric Research)
Gate 10 Silverdale Road, Box 11-115, Hamilton, New Zealand
Phone (+64) 7-856 1769
Fax (+64) 7-856 0151
Web http://www.niwa.cri.nz
------------------------------------------------------------------