[Zope] Newbie: Missing a Variable (TAL/METAL Question)

Alexis Roda alexis.roda.villalonga at gmail.com
Fri Jul 28 19:07:57 EDT 2006

En/na beno - ha escrit:
> Here is the error it throws as reported through the TTW:
>     Site Error
> An error was encountered while publishing this resource.
> *KeyError*
> Sorry, a site error occurred.
> Traceback (innermost last):

number is defined *only* in the block where you define it and enclosed 
blocks, in the first <TD> in your case. IIRC TAL provides a way to make 
a variable global, not sure, never used it. A more structured way would 
be to wrap all <TD>s with some block that defines number:

<div tal:define="number repeat/item/number"
   <td tal:content="number"></td>
   ... metal:use-macro="here/?number/macros/author" ...


More information about the Zope mailing list