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

nobody@nowhere.com nobody@nowhere.com
Thu, 29 Aug 2002 19:57:04 -0400

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


      Normally you'll refer to a macro in a 'metal:use-macro'
      statement with a path expression. However, you can use any
      expression type you wish so long as it returns a macro. For

        <p metal:use-macro="python:here.getMacro()">
          Replaced with a dynamically determined macro,
          which is located by the getMacro script.

        % Anonymous User - June 25, 2002 4:44 pm:
         > ... so long as it returns a macro.

         A macro *object*. Contrary to what the previous comment says, returning a macro path (return
         'template/macros/foo') won't work.

        % Anonymous User - Aug. 29, 2002 7:57 pm:
         An example of the getMacro() script would be nice. Or this might be a good place to expalin the python:path()