[Zope-CMF] <metal> and <tal> tag in ZPT

Jon Edwards jon@pcgs.freeserve.co.uk
Wed, 1 May 2002 11:14:09 +0100


Chris wrote :
>
> ...and this one. I see no reason to spew out lots of unneccessary <div>'s.
>
> <tal:x define="x x">
>
> ...makes a nice shorthand for:
>
> <div tal:omit-tag="" tal:define="x x">

Chris (or anyone), how do editors like Dreamweaver handle this - do they
choke on unrecognised <tal> tags? In my quest for ZPT-Zen I'm trying to tidy
up and improve my style, and as you say, this does seem much neater than
lots of nested divs and spans.

On a slight tangent, when you do a "define" in ZPT does it work similarly to
a <dtml-with> in DTML? i.e. puts the thing you have defined into the
namespace until the closing tag? So, if you have an expensive call, you're
only doing it once, then using the results from the namespace, as long as
you're within the "define" tags? (Does that question make any sense, it's
hard to explain? ;-)

...I've been looking at the different ways of doing a Monthly Events
Calendar display, trying to work out which is most efficient!

Cheers, Jon