[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Using Zope Page Templates

webmaster at zope.org webmaster at zope.org
Thu Nov 20 09:41:35 EST 2003


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

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

    The interesting part is the 'tal:repeat' attribute on the 'tr'
    HTML tag.  This attribute tells the template to iterate over the
    values returned by "container/files", which is the Python script
    you created in the current folder (the "container"), which returns
    a list of Zope objects.  The repeat tag causes Zope to create a
    new table row with columns representing a bit of metadata about
    each of those objects.  During each iteration, the current file
    object being iterated over is assigned the name 'item'.

      % Anonymous User - Nov. 20, 2003 9:41 am:
       With each pass through the loop the tal:repeat attribute creates a variable/property/thing named 'item' (this
       is an arbitrarily chosen name, it could be named anything) and pushes it into the namespace stack?
       This variable/property/thing references one of the file which was returned by the python script?

       On the first pass through the loop 'item' represents the first file returned by the python script?
       On the second pass through the loop 'item' represents the second file returned by the python script? etc...?



More information about the ZDP mailing list