ZPT Basics (part 2) (
Page 1 of 9 )
Dig deeper into the world of ZPT with examples and
illustrations of how to create, manipulate and use variables and
conditional tests in your templates.In the first part of this series, I introduced you to Zope Page
Templates, explaining how they offered Zope developers an advantage over
traditional DTML by separating user interface code from program logic. I
also told you a little bit about the three components of ZPT, and gave
you a crash course in TAL syntax and expressions.
In this second part, I'm going to continue exploring the ZPT landscape,
delving deeper into the mysteries of TAL with a look at the special TAL
attributes used to define template variables and perform conditional
processing in your templates. While I will be including lots of examples
to help you understand the concepts better, you *will* need to have read
the first part of this article in order to figure out what I'm driving
at in this second one. In case you haven't already - go get yourself up
to speed and then flip the page for more.