ZPT Basics (part 4) - Link Zone (
Page 5 of 5 )
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:
The official Zope Web site, at
http://www.zope.org/
Zope documentation, at
http://www.zope.org/Documentation
ZPT documentation, at
http://www.zope.org/Wikis/DevSite/Projects/ZPT/FrontPage
ZPT language specifications, at
http://www.zope.org/Wikis/DevSite/Projects/ZPT/LanguageSpecifications
A simple ZPT tutorial, at
http://www.zope.org/Wikis/DevSite/Projects/ZPT/SimpleTutorial
The ZPT FAQ, at
http://www.zope.org/Wikis/DevSite/Projects/ZPT/FAQ
The METAL HOW-TO, at
http://www.zope.org/Members/tone/METAL
Until next time...be good!
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!