[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Extending Zope

webmaster at zope.org webmaster at zope.org
Fri May 21 05:10:20 EDT 2004


A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/CustomZopeObjects.stx#2-28

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

    So what's going to happen is that when someone chooses *Zoo Exhibit*
    from the product add list, the *addForm* method will run. This method
    should collect information about the id and title of the
    exhibit. When the user clicks *Add* it should call the *add* script
    that will copy the *exhibitTemplate* folder into the calling folder
    and will rename it to have the specified id.  The next step is to
    edit the *addForm* method to have these contents::

      <dtml-var manage_page_header>

        <h2>Add a Zoo Exhibit</h2>

        <form action="add" method="post">
        id <input type="text" name="id"><br>
        title <input type="text" name="title"><br>
        <input type="submit" value=" Add ">
        </form>

      <dtml-var manage_page_footer>

      % Anonymous User - May 21, 2004 5:07 am:
       In ZPT, the equivalent is:
       <code>
       &lt;span tal:replace="structure here/manage_page_header"/&gt;

         &lt;h2&gt;Add a Zoo Exhibit&lt;/h2&gt;

         &lt;form action="add" method="post"&gt;
         id &lt;input type="text" name="id"&gt;&lt;br&gt;
         title &lt;input type="text" name="title"&gt;&lt;br&gt;
         &lt;input type="submit" value=" Add "&gt;
         &lt;/form&gt;

       &lt;span tal:replace="structure here/manage_page_footer"/&gt;
       </code>

      % Anonymous User - May 21, 2004 5:10 am:
       Darn this annoying sub-wiki comment nonsense.  That should read:
       The ZPT equivalent is:
       <span tal:replace="structure here/manage_page_header"/>

         <h2>Add a Zoo Exhibit</h2>

         <form action="add" method="post">
         id <input type="text" name="id"><br>
         title <input type="text" name="title"><br>
         <input type="submit" value=" Add ">
         </form>

       <span tal:replace="structure here/manage_page_footer"/>



More information about the ZDP mailing list