[Zope] Two more questions
Paul Winkler
pw_lists at slinkp.com
Tue Dec 2 23:48:46 EST 2003
On Tue, Dec 02, 2003 at 10:56:15PM -0500, Paul Winkler wrote:
> On Tue, Dec 02, 2003 at 07:27:42PM -0700, Goldthwaite, Joe wrote:
> > Thanks again. Still no go although it looks like it's getting closer.
> > I tried this;
> >
> > <tr tal:replace="item python:here.GetISLines(FY=request.FY,
> > Per=request.Per)">
> >
> > To my programmer eyes, that looks like it might be correct.
>
> To mine it looks wrong :-)
> In fact, you should get a Compilation Failed error when you
> save that page template. That's what I get here.
I neglected to mention why this is so.
There are two general forms of tal statements:
those that take only a TALES expression, and those
that take an identifier followed by whitespace followed
by an expression. tal:replace is one of the former,
so the "item" identifier is syntactically incorrect and
must be removed.
Identifiers are not allowed for tal:condition, tal:content,
tal:omit-tag, tal:on-error, tal:replace.
Identifiers are required for tal:attributes, tal:define, and
tal:repeat.
I was about to suggest that you need to read the Zope Book
introductory chapter on Page Templates. However, just
having re-read it for the first time in a long time,
I don't think it's very newbie-friendly at all.
Maybe you read it already :-\
It skips too quickly through the basics, doesn't really
explain some basic concepts, and gets you into
writing python scripts too early, a topic which is covered
more appropriately in later chapters.
--
Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's BUSTY HYDRO WIZARD!
(random hero from isometric.spaceninja.com)
More information about the Zope
mailing list