[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Advanced Page Templates

webmaster@zope.org webmaster@zope.org
Thu, 26 Sep 2002 13:37:42 -0400

A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/AdvZPT.stx#3-87


      An ordinary path expression tries to render the object
      that it fetches.  This means that if the object is a function,
      Script, Method, or some other kind of executable thing, then
      the expression will evaluate to the result of calling the object.
      This is usually what you want, but not always.  For example,
      if you want to put a DTML Document into a variable so that
      you can refer to its properties, you can't use a normal path
      expression because it will render the Document into a string.

        % Anonymous User - Sep. 26, 2002 1:26 pm:
         A function is callable by itself; besides that, python objects may have a __call__-method, which makes them
         *callable*. In zope objects like Python Script, DTML Documents, DTML Methods and Page Templates and many
         others are callable.

        % Anonymous User - Sep. 26, 2002 1:37 pm:
         *Path Expression*   <==> <dtml-var name="..."> automacically calling callables.
         *Nocall Expression* <==> <dtml-var expr="..."> return the object without calling.