[ZPT] Placeholder question

Scott Burton mrzope@hotmail.com
Tue, 20 Nov 2001 19:53:08 +0000


Thanks Evan, that did the trick!

Scott Burton

>From: Evan Simpson <evan@zope.com>
>To: Scott Burton <mrzope@hotmail.com>
>CC: zpt@zope.org
>Subject: Re: [ZPT] Placeholder question
>Date: Tue, 20 Nov 2001 10:03:59 -0500
>
>Scott Burton wrote:
>
>>I  figured I could do the math with <span tal:define="total python:total
>>+ 1"></span> within the repeat tag. So it looks to me as if the
>>placeholder issue is what is holding me back.
>
>You can do this, but only with global variables:
>
><tal:block define="global tot python:0" repeat="item items">
>   <tal:block define="global tot python:tot + item.foo" />
></tal:block>
>
><span tal:replace="tot">The foo total</span>
>
>
>If your logic is any more complicated than this, you should use a Script.
>
>Cheers,
>
>Evan @ Zope
>
>
>_______________________________________________
>ZPT mailing list
>ZPT@zope.org
>http://lists.zope.org/mailman/listinfo/zpt


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp