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

webmaster@zope.org webmaster@zope.org
Sun, 22 Sep 2002 06:17:59 -0400

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


    The 'tal:repeat' statement on the table row means "repeat this row
    for each item in my container's list of object values".  The
    repeat statement puts the objects from the list into the 'item'
    variable one at a time (this is called the *repeat variable*), and
    makes a copy of the row using that variable.  The value of
    "item/getId" in each row is the Id of the object for that row, and
    likewise with "item/meta_type" and "item/title".

      % Anonymous User - Sep. 22, 2002 6:02 am:
       TAL processing replaces text with text. So we dont have table rows, we have TR tags in the source. For each
       object in the list the whole text "<tr ... /tr>" is first repeated(copied), then processed (using the current
       object in the list) yielding the target text.

      % Anonymous User - Sep. 22, 2002 6:17 am:
       The named repeat variable is only defined in the corresponding repeat tag.
       HTML block tags may nest. When both an outer and an inner tag repeat, different names for outer and inner
       repeat variables allow to discern between outer and inner repetition.