In addition to DTML Documents, Zope also includes a strange animal called a DTML Method. There are a number of fairly obvious similarities between a DTML Document and a DTML Method, together with some very subtle differences. It's the differences that can catch you out - which is why you should get to know them at this stage itself.
The most important of these differences is that while a DTML Document is an object with properties of its own, a DTML Method is an object which inherits properties from its container. Which is why, if you create a DTML Method
and take a look at it in the Zope management interface, you'll notice the absence of a "Properties" tab on the top of the page (DTML Documents, on the other hand, have a very visible "Properties" tab).
As an illustration, create two objects, one a DTML Document and the other a DTML Method, and attach the following code to each:
I am <dtml-var id>
Now, when you view these objects, you'll see that the DTML Document displays its ID correctly,
I am FirstStep
whereas the DTML Method displays the ID of its container - the parent folder (which I named "DTML Basics" a couple of pages ago).
I am DTML Basics
Consequently, DTML Documents are typically used to display static content, while DTML Methods are used to display dynamic content..