[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Dynamic Content with DTML
Sat, 21 Sep 2002 20:24:19 -0400
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/DTML.stx#2-63
This will insert the value of the variable named *getHippo*, whatever
that may be. DTML will automatically take care of the details, like
finding the variable and calling it. We call this basic tag syntax
*name* syntax to differentiate it from *expression* syntax.
% Anonymous User - Sep. 21, 2002 8:24 pm:
A *variable* is a pair (name, value) where in most cases value is an object of some class.
(python has yet not completely unified _simple types_ (eg 'int') and classes).
*If* value is callable, its called and the result of the call inserted.
If value is not callable (like for integers), the value itself is inserted.
As DTML is about textual replacement in both cases a suitable string representation is inserted. (for
integers the usual one).