And that just about concludes this little tour of METAL. In this final article, I showed you how to use macros in your templates, and demonstrated how they could substantially reduce the time spent on making changes to your Zope application while simultaneously adding a new level of reusability to your code. I also illustrated how METAL macros can be made even more flexible by the addition of "slots", macro placeholders which can be dynamically replaced with different content each time the macro is invoked.
I hope you enjoyed this tutorial on Zope Page Templates, and that it gave you some insight into how your Zope applications can be made more modular. In case you're looking for more information on Zope in general, or ZPT in particular, drop by the following links:
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!