Home arrow Zope arrow ZPT Basics (part 4)

ZPT Basics (part 4)

In this concluding article, get up close and personal with METAL, the macro language that allows you to add reusability to your Zope templates.

  1. ZPT Basics (part 4)
  2. The Idiot Box
  3. The Real McCoy
  4. Slotting Into Place
  5. Link Zone
By: Harish Kamath, (c) Melonfire
Rating: starstarstarstarstar / 10
October 31, 2002

print this article


Three weeks ago, I started you off on a tour of Zope Page Templates, explaining what they were and how they could make your life more interesting. I unraveled the mystery behind TAL, the attribute language used in ZPT, and TALES, the expression syntax that allows you to use TAL in a logical manner. I showed you how to place content and replace text within a template, define variables, create and use conditionals and loops, and use ZPT's error-handling capabilities

So where that does leave us? At the threshold of the concluding article of this series, in which I'll be explaining the third component of the ZPT jigsaw: METAL.

METAL, or Macro Expansion for TAL is "...an attribute language for structured macro preprocessing". Translated, this means that METAL allows you to simplify your ZPT development with macros, code snippets that can be reused extensively across one or more templates. The obvious advantage of this: a single change in the macro will be immediately visible at all places that it has been referenced.

Let's see how it works.

>>> 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: