[Zope] tal define and repeat

Tino Wildenhain tino@wildenhain.de
Thu, 05 Dec 2002 22:16:18 +0100


Hi,

--On Donnerstag, 5. Dezember 2002 12:12 -0700 Mark Gibson 
<mark@dimensional.com> wrote:

> David Bear wrote:
>> I have want to use something like
>>
>> <div tal:repeat="topic python:container.listZPT">
>>   <p tal:content="topic/title_or_id"> stuff </p>
>> </div>
>>
>> the listZPT is a script the returns a list of page template objects.
>>
>> this throws an TALES exception on repeat topic.
>>
>> Is it not possible to repeat over a list object in TAL?

repeating over a list is what repeating means in TAL.

<p tal:repeat="topic container/listZPT" tal:content="topic/title_or_id"> 
stuff </p>

You dont need the extra <div> around if its not for structuring
the content.

Regards
Tino
>
>
> You need to 'call' your script:
>
> i.e.:  <div tal:repeat="topic python:container.listZPT()">
>
Why not making it more complex and wrong? ;))