[ZPT] repeat attribute?

richard@bizarsoftware.com.au richard@bizarsoftware.com.au
Thu, 05 Apr 2001 12:15:30 +1000


richard@bizarsoftware.com.au wrote:
> 
> The following PT fragment breaks, unable to find 'repeat':
> 
> <div tal:repeat="txt python:'one', 'two', 'three'">
>  <span tal:replace="repeat/txt/index">1</span>:
>  <span tal:replace="txt">txt</span><br>
> </div>
> 
> I've poked around the TAL source and I can't find where the attribute is
> generated...
> 
> Still looking...

OK, I found where the attribute is created, and it's called 'loop', in
TALES.Context.setRepeat...

So, which is wrong, the 1.0 spec or the code?


Now, when I switch to using <span tal:replace="loop/txt/index">1</span>, I
get a security assertion error:

Unauthorized: Access denied for <Products.PageTemplates.TALES.Iterator
instance at 8b26c78> because its container, <MultiMapping object at
8ae14c8>, has no security assertions.

... erk...



    Richard

-- 
Richard Jones
richard@bizarsoftware.com.au
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)