
Table of Contents
Using Zope Documents ........................................................................................................................24
DTML Documents................................................................................................................................24
Creating DTML Documents.................................................................................................................25
Editing DTML Documents...................................................................................................................25
Uploading an HTML File.....................................................................................................................26
Remote Editing with FTP, WebDAV, and PUT...................................................................................26
Uploading Documents and Files with WS_FTP...................................................................................27
Editing Zope Objects with Emacs.........................................................................................................28
Editing DTML Documents with WebDAV..........................................................................................29
Reviewing Changes to Documents.......................................................................................................30
Viewing DTML Documents.................................................................................................................30
Calling Through the Web........................................................................................................31
Calling from Another Object...................................................................................................31
Using Zope Files...................................................................................................................................32
Uploading Files.....................................................................................................................................32
Viewing Files........................................................................................................................................33
Using Zope Images ..............................................................................................................................33
Viewing Images with HTML................................................................................................................33
Viewing Images Through the Web.......................................................................................................34
Using Object Properties........................................................................................................................34
Coding Logic with Scripts...................................................................................................................36
Using Methods .....................................................................................................................................37
Comparing DTML Documents and Methods.......................................................................................39
Using Versions......................................................................................................................................40
Cache Manager.....................................................................................................................................42
Adding a Cache Manager......................................................................................................................43
Caching a Document.............................................................................................................................44
Virtual Hosting Objects........................................................................................................................44
Sending mail with MailHost.................................................................................................................45
Chapter 4: Dynamic Content with DTML.....................................................................................................46
Who is DTML For?..............................................................................................................................46
What is DTML Good for?.....................................................................................................................46
When Not to Use DTML......................................................................................................................47
DTML Tag Syntax................................................................................................................................48
Using DTML Tag Attributes...................................................................................................48
Inserting Variables with DTML............................................................................................................49
Processing Input from Forms................................................................................................................50
Dynamically Acquiring Content...........................................................................................................51
Using Python Expressions from DTML...............................................................................................53
DTML Expression Gotchas.....................................................................................................54
The Var Tag..........................................................................................................................................55
Var Tag Attributes...................................................................................................................55
Var Tag Entity Syntax.............................................................................................................56
The If Tag.............................................................................................................................................56
Here's an example condition:...................................................................................................56
Name and Expression Syntax Differences...............................................................................57
Else and Elif Tags....................................................................................................................57
Using Cookies with the If Tag..............................................................................................................58
The In Tag.............................................................................................................................................59
Iterating over Folder Contents.................................................................................................59