Home arrow Zope arrow Page 6 - ZPT Basics (part 3)

Endgame - Zope

Now that you've got the skinny on variables and conditional statements, expand your knowledge of the ZPT universe with this discussion of TAL loops, dynamically-generated attributes and error handlers.

  1. ZPT Basics (part 3)
  2. When In Rome...
  3. Members Only
  4. Sticks And Stones
  5. Handling Errors
  6. Endgame
By: Harish Kamath, (c) Melonfire
Rating: starstarstarstarstar / 9
October 09, 2002

print this article


And that's about it for the moment. In this article, I gave you a crash course in the remaining TAL attributes, showing you how the "repeat" attribute could be used to iterate over sequences and replicate the functionality of the standard loop constructs found in other languages; I also demonstrated how this could be used in the real world, by dynamically building a Web page from a MySQL database and a single repeating template.

Next, I illustrated how ZPT lets you dynamically define attributes in your Web page, and also showed you how you could combine this capability with the "repeat" attribute discussed previously to iteratively build a Web page. Finally, I wrapped things up with a quick look at the primitive error-handling capabilities available in ZPT, demonstrating how it can provide a viable - if not very powerful - alternative to Zope's built-in error handler.

In the next - and concluding - article in this series, I'll be taking you on a guided tour of METAL, the macro expansion language that forms an important component of ZPT's reusability. Come back soon for that...and until then, stay healthy!

Note: All examples in this article have been tested on Linux/i586 with Zope 2.5.0. Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article. YMMV!

>>> More Zope Articles          >>> More By Harish Kamath, (c) Melonfire

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Creating Zope Products
- Plone Content Types With Archetypes
- Flat User Management in Zope
- Creating Basic Zope Applications
- Getting started with Zope for Linux and Sola...
- ZPT Basics (part 4)
- ZPT Basics (part 3)
- ZPT Basics (part 2)
- ZPT Basics (part 1)
- Exception Handling In DTML
- DTML Basics (part 4)
- DTML Basics (part 3)
- DTML Basics (part 2)
- DTML Basics (part 1)
- Using Zope With Apache

Developer Shed Affiliates


Dev Shed Tutorial Topics: