Examples

This page collects exemplar usages of ZPT.

There’s a trio of example Page Templates (with support data) that you can try out by copying ‘PageTemplates/examples/zpt_examples.zexp’ into your ‘import’ directory and importing it somewhere. One of them shows off batching, another shows how to make a tree widget, and the third calls DTML Methods from ZPT.

Standard Look And Feel Example
A master template replacement for standard_header and standard_footer.
Simple Welcome Example
A simple example template using StandardLookAndFeel.
Loop Examples
Looping

Some “DTML to ZPT”, http://www.zope.org/Members/peterbe/DTML2ZPT_Conversion_examples conversion examples

Comments

weitzman (Sep 20, 2001 8:11 pm; Comment #2) Editor Remark Requested
I reviewed the included example on batching but the code is a bit overwhelming. A brief doc on batching would be most appreciated.
teyc (Oct 16, 2001 8:58 pm; Comment #3) Editor Remark Requested
The Fulton presentation suggested Scripts can be used as URL targets instead of PageTemplates themselves. Could someone furnish an example of this?