Alexis Rhoda's suggestion sounds similar. I edited the code as follows, both with and without the 'global' parameter with the same error thrown. I read the material you recommended before writing the list and have been referencing it. I confess that snakes would bite me repeatedly though before my eyes for lack of seeing them, no matter how hard I try. Your further help would be very much appreciated. TIA,<br>beno<br><br> <tr tal:repeat="item batch"><br> <tal:block define="global number repeat/item/number"><br> <td tal:content="number">1</td><br> <td tal:content="item/title">title</td><br> <td><tal:content metal:use-macro="here/?number/macros/author">author</tal:content></td><br> <td><tal:content metal:use-macro="here/?number/macros/content">content</tal:content></td><br> <td
tal:content="item/bobobase_modification_time"><br> modification date</td> <br> </tal:block><br> </tr><br><br><span idspanfor="frame" mlb_idspanflag="true" style="border: 1px solid black; padding: 0px 3px; z-index: 500; font-size: xx-small; font-family: sans-serif; background-color: rgb(214, 227, 254); position: absolute; top: 0pt; left: 0pt;">3</span><br><div><strong>TypeError</strong></div> Sorry, a site error occurred.<div>Traceback (innermost last): </div><ul><li> Module ZPublisher.Publish, line 175, in publish_module_standard</li><li> Module ZPublisher.Publish, line 132, in publish</li><li> Module Zope.App.startup, line 204, in zpublisher_exception_hook</li><li> Module ZPublisher.Publish, line 101, in publish</li><li> Module ZPublisher.mapply, line 88, in mapply</li><li> Module ZPublisher.Publish, line 39, in call_object</li><li> Module Shared.DC.Scripts.Bindings, line 306, in
__call__</li><li> Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec</li><li> Module Products.PageTemplates.ZopePageTemplate, line 222, in _exec</li><li> Module Products.PageTemplates.PageTemplate, line 96, in pt_render<br> <b><ZopePageTemplate at /rejoice.2012.vi/en-us/Books/getQuote used for /rejoice.2012.vi/en-us/Books/test></b></li><li> Module TAL.TALInterpreter, line 190, in __call__</li><li> Module TAL.TALInterpreter, line 234, in interpret</li><li> Module TAL.TALInterpreter, line 613, in do_loop_tal</li><li> Module TAL.TALInterpreter, line 234, in interpret</li><li> Module TAL.TALInterpreter, line 409, in do_optTag_tal</li><li> Module TAL.TALInterpreter, line 394, in do_optTag</li><li> Module TAL.TALInterpreter, line 389, in no_tag</li><li> Module TAL.TALInterpreter, line 234, in interpret</li><li> Module TAL.TALInterpreter, line 657, in do_useMacro</li><li> Module Products.PageTemplates.TALES, line 221, in evaluate<br> <b>URL:
/rejoice.2012.vi/en-us/Books/getQuote</b><br> <b>Line 22, Column 8</b><br> <b>Expression: standard:'here/?number/macros/author'</b><br> <b>Names:</b><pre>{'container': <Folder instance at e909350>,<br> 'context': <Folder instance at 92e1ad0>,<br> 'default': <Products.PageTemplates.TALES.Default instance at 0x8a1d62c>,<br> 'here': <Folder instance at 92e1ad0>,<br> 'loop': <SafeMapping instance at 8ff2380>,<br> 'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x8a1d06c>,<br> 'nothing': None,<br> 'options': {'args': ()},<br> 'repeat': <SafeMapping instance at 8ff2380>,<br> 'request': <HTTPRequest, URL=http://rejoice.2012.vi/Books/test/getQuote>,<br> 'root': <Application instance at 90c1f80>,<br> 'template': <ZopePageTemplate at /rejoice.2012.vi/en-us/Books/getQuote used for /rejoice.2012.vi/en-us/Books/test>,<br> 'traverse_subpath': [],<br> 'user': Anonymous
User}</pre></li><li><br></li><li> Module Products.PageTemplates.Expressions, line 174, in __call__</li><li> Module Products.PageTemplates.Expressions, line 162, in _eval</li><li> Module Products.PageTemplates.Expressions, line 107, in _eval</li></ul>TypeError: iteration over non-sequence (Also, an error occurred while attempting to render the standard error message.) <hr noshade="noshade"><br><br><b><i>Dieter Maurer <dieter@handshake.de></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> beno - wrote at 2006-7-28 15:43 -0700:<br>> ...<br>> <br>> <br>> tal:content="number">1<br>> title<br>> <tal:content metal:use-macro="here/?number/macros/author">author</tal:content><br>> ...<br>> Traceback<br>> ...<br>> Line 22, Column 4<br>> Expression: standard:'here/?number/macros/author'<br>> ...<br>>KeyError: 'number' (Also, an error
occurred while attempting to render the standard error message.)<br><br>The traceback tells you (kept part) that the "KeyError: 'number'" comes<br>from "here/?number/macros/author" and it is right:<br><br> Unless you use "global", variables defined in TAL only live<br> within the element (aka "tag") you have defined them in.<br><br> In your special case, this is the "td" element.<br> It it not defined in the following "td"s.<br><br>A common approach is to use artificial "block" elements to<br>carry the definitions for some elements in the loop body -- similar to<br><br> <br> <tal:block define="number ..."><br> <br> ...<br> <tal:content metal:use-macro="here/?number/..."><br> ...<br> </tal:content><br> <br><br>Apparently, you already use "tal" prefixed tag names.<br>The "tal:block" is another standard use...<br><br><br>Another advice: carefully read the PageTemplate section in<br>the Zope Book (2.7 edition, on "plope.org").<br><br><br><br>--
<br>Dieter<br></tal:block></blockquote><br><p> 
                <hr size=1>Groups are talking. We´re listening. Check out the <a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=41144/*http://groups.yahoo.com/local/newemail.html">handy changes to Yahoo! Groups.</a>