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

webmaster@zope.org webmaster@zope.org
Thu, 26 Sep 2002 11:18:10 -0400


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

---------------

      If you insist on doing a crummy job of things, you can always
      create a lame version of the form-action pair using Page
      Templates. You should only do this when you don't care about
      error handling and when the response will always be the same,
      not matter what the user submits. Since Page Templates don't
      have an equivalent of dtml-call, you can use one of any number
      of hacks to call an input processing method without inserting
      its results. For example::

        <span tal:define="unused here/processInputs" 
              tal:omit-tag=""/>

        % Anonymous User - Apr. 29, 2002 4:25 pm:
         While the editorial comment is appropriate for forms (though not very artful) I would think the simple point
         is that template do have an equivalent to dtml-call and can simply call a method without inserting its
         results.
         example:
         <tal:method define="unused here/mycalledmethod"/>

        % Anonymous User - Sep. 26, 2002 11:18 am:
         STYLE: /crummy/, /lame/ sound like oral slang in written material

         Two possibilities:
         - <form action="Action"> w a separate script "Action",
           "Action" returning <code>container.responseTemplate()</code>
         - <form action="Response"> where "Response" contains 
              <span tal:define="unused here/processInputs" tal:omit-tag=""/>
         The issue: clean solution (separation of logic and content) vs browser url display
         Do other consideratiions come intoo play? Efficiency is probably neglectable.